Sorting a datagrid

  • Thread starter Thread starter reidarT
  • Start date Start date
R

reidarT

I have a datagrid on a windows form that is updated with new records.
When I add a new record to the table I want to automatically update the
datagrid by
filling it and refreshing it and in addition I want to sort a date column in
the datagrid Descending
(without clicking the column)
reidarT
 
reidarT said:
I have a datagrid on a windows form that is updated with new records.
When I add a new record to the table I want to automatically update the
datagrid by
filling it and refreshing it and in addition I want to sort a date column in
the datagrid Descending
(without clicking the column)
reidarT

DataTable.Clear
DataAdaptor.Fill(DataTable)
DataTable.DefaultView.Sort

B.
 
Back
Top