Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > create a dataview from a datagrid

Reply
Thread Tools

create a dataview from a datagrid

 
 
William French
Guest
Posts: n/a
 
      12-03-2003
Does anyone know how to create a dataview from a datagrid. The
examples I see for sorting are persisting the dataset, datatable, or
dataview in viewstate. It seems like a waste for the datagrid and the
dataview to both be stored in viewstate. Any ideas would be greatly
appreciated.
 
Reply With Quote
 
 
 
 
Paul
Guest
Posts: n/a
 
      12-15-2003
Bill,
One way is to set the DataView Table property to the table that you use
to populate the grid.

Dim dv as New DataView
dv.table = yourDataSet.yourTable
dv.sort "IDField DESC"
DataGrid1.DataSource = dv
DataGrid1.DataBind




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorted DataView, but unsorted datalist when bound to the dataview CodeMonkey ASP .Net 1 02-04-2011 10:55 AM
DataView, DataGrid sorting and incorrect SelectedIndex brian_is_online@yahoo.co.uk ASP .Net 0 07-18-2006 04:55 PM
DataView, DataGrid and IsPostBack enceladus311@yahoo.com ASP .Net 5 01-10-2006 06:21 PM
Create datable/dataview from datagrid fabrice ASP .Net 1 12-15-2005 01:49 AM
Datagrid / Dataview won't sort troyblakely@gmail.com ASP .Net 1 11-05-2005 01:29 PM



Advertisments