Manually sort elements in datagrid

  • Thread starter Thread starter Garry Newman
  • Start date Start date
G

Garry Newman

How can I manually sort elements in my datagrid as .NET
places them in alphabetical order ?

G.N
 
As in how can I manually arrange the order of the fields
in my datagrid so that they appear the way I want, not
alphabetical ?

G.N
 
Are you using WebForms or WindowsForms?

In WindowsForms you can accomplish this by adding a TableStyle to your grid
and putting column definitions in this TableStyle. You can do this quit easy
in the designer.

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 
ok I've added a tablestyle to the DataGrid and then added
my fields (in the order I want) as memebers of the
DataGridColumnStyleCollection by setting the Mapping Name
property to the relevant field in my table, but this
doesn't make any difference to the order at runtime, so
I've either missed a step or set the wrong property ???

any ideas

Thanks G.N
 
Yeah I did that but...

I made two extremely stupid mistakes the first was not to
give the column headers names and the second was not to
fill the dataset these events resulted in instant
confusion and bewilderment

Thanks for your help

G.N
 
Back
Top