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?
 
Back
Top