Gridview

  • Thread starter Thread starter bbawa1
  • Start date Start date
B

bbawa1

Hi,

I have a question. I have a gridview in my aspx page. I grabed the
data from table. But I want that when I see the aspx page initialy the
gridview should be sorted by a column name FirstName in asscending
order by default. How can I do that.



Thanks
 
The DataTable class has a DefaultView object, on which you can specify the
Sort field. Then, you would bind to that DataView (which is now sorted)
instead of to the DataTable proper.
Peter
 

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

Back
Top