Hello Again. Since my 1st post didn't go over too well I'll try this.
If I have 2 dataviews (1 default and 1 with it's rowfilter set) created from the same dataset.table can I bind 1st dataview to the datagrid and display it during the page load. Then after some event fires can I change the same grid's source to the 2nd dataview and rebind to display the filtered table data or will I get zip displayed except for maybe the grid header? See code below.
Thanks, Slim
If I have 2 dataviews (1 default and 1 with it's rowfilter set) created from the same dataset.table can I bind 1st dataview to the datagrid and display it during the page load. Then after some event fires can I change the same grid's source to the 2nd dataview and rebind to display the filtered table data or will I get zip displayed except for maybe the grid header? See code below.
Thanks, Slim
VB.NET:
dim dv1 as dataview 'Global
dim dv2 as dataview 'Global
Private Sub Page_Load(...)
If not Page.IsPostBack then
daFile.fill(dsFile)
dv1 = new dataview(dsFile.Table(0))
dv2 = new dataview(dsFile.Table(0)
dv2.rowfilter = "Edition = '1st'"
dg.datasource = dv1
databind()
End If
End Sub
Private Sub button1_Click(....)
dg.datasource = dv2
databind()
End Sub
Sub databind()
dg.databind()
End Sub