How do you sort the data in datagrid?
Answer Posted / sunil
In a simple method,
DataSet ds = new DataSet();
// you must populate the dataset
DataTable dt = ds.tables[0];
DataView dv = new DataView(dt);
dv.Sort = dt.Columns[0];
// This will sort first column in ascending
dv.Sort = dt.Columns[0] + " DESC";
// This will sort first column in descending
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
What is a datagridview?
Which is faster ado.net or linq?
What is ole in excel?
Describe datareader object of ado.net with example.
What is the use of sqldatareader class?
What are basic methods of dataadapter?
What are the Data providers in ADO.Net?
What is linq and entity framework?
What is ado circle?
Give an example of a .net application which connects to microsoft access database using ado.net classes.
What is ole db and odbc?
Explain how to find the given query is optimised one or not?
Explain the various objects in dataset.
Difference between sqlcommand and sqlcommandbuilder?
Explian About DataAdapters