Good Day/Evening,
I'm having some problems with the setting the datasource of 3 radgrid controls each in it's own RadPageView in the Multipage for a tabstrip.
E.G
RadGridUsers
Column 1 Column 2 Column 3 SelectButton
TAB 1 | TAB 2 | TAB 3
MULTIPAGE
----------------
RADGrid1
----------------
RADGrid2
----------------
RADGrid3
----------------
Now what I'm doing is when I get a SelectedIndexChanged event from RadGridUsers, i want to set the RadGrid1,RadGrid2 and RadGrid3's datasource to Nothing (Null in C#) before I update the grids with new data. The problem I'm having is that the Grids Row Count of RadGrid1, RadGrid2 and RadGrid3 is still greater than 0 even after I set the datasource to Nothing.
After I set all the RadGrid's Datasource to nothing and then only update the selected tabs RadGrid, I want the user to selecte another TAB (e.g TAB 3) and what I do then is check if the TAB3's RADGrid has any Items by doing this
My Problem is that the item count is always greater than 0 even after I've set the Datasource to Nothing and then did a RadGrid.DataBind.
Your help would be much appreicated.
I'm having some problems with the setting the datasource of 3 radgrid controls each in it's own RadPageView in the Multipage for a tabstrip.
E.G
RadGridUsers
Column 1 Column 2 Column 3 SelectButton
TAB 1 | TAB 2 | TAB 3
MULTIPAGE
----------------
RADGrid1
----------------
RADGrid2
----------------
RADGrid3
----------------
Now what I'm doing is when I get a SelectedIndexChanged event from RadGridUsers, i want to set the RadGrid1,RadGrid2 and RadGrid3's datasource to Nothing (Null in C#) before I update the grids with new data. The problem I'm having is that the Grids Row Count of RadGrid1, RadGrid2 and RadGrid3 is still greater than 0 even after I set the datasource to Nothing.
Private Sub RadGridUsers_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGridUsers.SelectedIndexChanged'Clear all Grids of any previous account's dataRADGrid1.DataSource = NothingRADGrid1.DataBind()RADGrid2.DataSource = NothingRADGrid2.DataBind()RADGrid3.DataSource = NothingRADGrid3.DataBind()Select Case TabStrip.SelectedTab.TextCase "TAB 1" RADGrid1.Datasource = GetProfile RADGrid1.DataBind() Exit SelectCase "TAB 2" RADGrid2.Datasource = GetAddressDetails RADGrid1.DataBind() Exit SelectCase "TAB 3" RADGrid3.Datasource = GetOrderHistory RADGrid1.DataBind() Exit SelectEnd SelectEnd SubAfter I set all the RadGrid's Datasource to nothing and then only update the selected tabs RadGrid, I want the user to selecte another TAB (e.g TAB 3) and what I do then is check if the TAB3's RADGrid has any Items by doing this
Private Sub TabStrip_TabClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTabStripEventArgs) Handles TabStrip.TabClick Select Case e.Tab.Text Case "TAB1" If Not RadGrid1.Items.Count > 0 Then RadGrid1.Datasource = GetProfile End If Case "TAB2" If Not RadGrid2.Items.Count > 0 Then RadGrid2.Datasource = GetAddressDetails End If Case "TAB3" If Not RadGrid3.Items.Count > 0 Then RadGrid3.Datasource = GetOrderHistory End If End SelectEnd SubMy Problem is that the item count is always greater than 0 even after I've set the Datasource to Nothing and then did a RadGrid.DataBind.
Your help would be much appreicated.