Sorting a datagrid

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
 
B

Brian Tkatch

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top