Depends on a column value on a row, I need to change datasource (database vs AD).
I used ObjectDataSource to pull the data if it's AD.
The problem I have now is that I cannot seem to retrieve the value of column that has the information I need to determine which datasource to use. The following code sees the first 2 columns and I even tried the .cell(1 to 15) and the value is not in any of them.
I used ObjectDataSource to pull the data if it's AD.
The problem I have now is that I cannot seem to retrieve the value of column that has the information I need to determine which datasource to use. The following code sees the first 2 columns and I even tried the .cell(1 to 15) and the value is not in any of them.
| Private Sub RadGrid1_DetailTableDataBind(ByVal source As Object, ByVal e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles RadGrid1.DetailTableDataBind |
| Dim dataitem As GridDataItem = e.DetailTableView.ParentItem |
| If dataitem.Item("the_column_I_need_to_check").Text = "AD" then 'it cannot find this column |
| Me.srcADMember.SelectParameters("role").DefaultValue = dataitem.Item("ADGroup").Text 'It finds ADGroup column |
| else |
| 'Use different data source |
| end if |