alternate sorting for grid view

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have 4 small gridviews all using the same data source. I want to set the
initial sort on load to be different for each. I this i should be using a
view. However, i'm not sure how to start the process . i'm looking for the
default view in the datasource, but cna't find it. and help or articals would
be appreciated.
 
Not sure whether you could do it declaratively - but can be easily achieved
programmatically, for example:
Dim table As DataTable = MyDataTableRetrievalMethod
MyGrid1.DataSource = New DataView(table, "", "Field1",
DataViewRowState.CurrentRows)
MyGrid1.DataBind()
....
MyGridN.DataSource = New DataView(table, "", "FieldN Desc",
DataViewRowState.CurrentRows)
MyGridN.DataBind()
 
I think this is wher ei may be hanging up on the method i'm attempting:
MyDataTableRetrievalMethod. given i have datasource how do i create this
method?

or sould the whole thing be done programaticly?
 

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

Similar Threads

Grid View sort by column 3
Sorting the Grid view by column 1
GridView in UpdatePanel only Updates once 8
Grid View and ODS 3
Grid view some Q: 1
GridView Sorting Problem 3
Failed to load view state 1
Grid view 1

Back
Top