Dataset..

  • Thread starter Thread starter Alen Smith
  • Start date Start date
A

Alen Smith

Is it possible to sort the data is dataset. .Net 1.1.

Thanks,

Smith
 
See the DefaultView member... The DataTable holds the data, views allows to
create sorted, filtered, restricted views of those data...
 
Where to add DefaultView member in the below code? How to SORT the data?

Dim myAdapter As New SqlDataAdapter(data from SP)

Dim ds As New DataSet

myAdapter.Fill(ds)

myDataGrid.DataSource = ds

myDataGrid.DataBind()

Thanks,

Smith
 
Dim _dv As DataView = New DataView(ds.Tables(0))
dv.Sort = Sort
myDataGrid.DataSource = dv
myDataGrid.DataBind()
 
Thanks a lot.
Smith
MarkD said:
Dim _dv As DataView = New DataView(ds.Tables(0))
dv.Sort = Sort
myDataGrid.DataSource = dv
myDataGrid.DataBind()



message
 

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