Hi,
I am using the Q3 1114 2013 version of your AJAX for ASP .NET controls.
I am using the Rad Grid and have added a checkbox to each Group Header in the grid. I do that in ItemDataBound...
The users can then check the checkbox and click a Save button that I've put in the CommandItemTemplate.
I have code in the ItemCommand event handler that should loop through all of the GroupHeaders, and get the state of that checkbox (along with other information I've put in the GroupHeader).
MY PROBLEM:
When my code loops through the GroupHeaders of the grid (in the ItemCommand event), the DataRowView is Nothing.
My code is as follows (which is basically the same code that works when I create the checkbox in ItemDataBound):
For Each headerItem As GridGroupHeaderItem In theRadGrid.MasterTableView.GetItems(GridItemType.GroupHeader)
Dim groupDataRow As DataRowView = CType(headerItem.DataItem, DataRowView)
Dim chk As CheckBox = headerItem.FindControl(GetGroupHeaderParentCheckboxName(groupDataRow("ParentAppType").ToString(), groupDataRow("ObjectTypeID").ToString(), groupDataRow("ParentID").ToString()))
If (chk.Checked) Then
selectedItemString += String.Concat(groupDataRow("ObjectTypeID").ToString(), KEY_VALUE_DELIMETER, groupDataRow("ParentID").ToString(), SETTING_PAIR_DELIMETER)
End If
Next
In the code above, the groupDataRow variable is Nothing. Can you tell me what I'm doing wrong?
I have other code in this same method that loops through all of the data rows in the grid and gets information from the data rows, and it works fine.
Why can I not access the DataRowView of the GroupHeader?
Thanks,
Michael
I am using the Q3 1114 2013 version of your AJAX for ASP .NET controls.
I am using the Rad Grid and have added a checkbox to each Group Header in the grid. I do that in ItemDataBound...
The users can then check the checkbox and click a Save button that I've put in the CommandItemTemplate.
I have code in the ItemCommand event handler that should loop through all of the GroupHeaders, and get the state of that checkbox (along with other information I've put in the GroupHeader).
MY PROBLEM:
When my code loops through the GroupHeaders of the grid (in the ItemCommand event), the DataRowView is Nothing.
My code is as follows (which is basically the same code that works when I create the checkbox in ItemDataBound):
For Each headerItem As GridGroupHeaderItem In theRadGrid.MasterTableView.GetItems(GridItemType.GroupHeader)
Dim groupDataRow As DataRowView = CType(headerItem.DataItem, DataRowView)
Dim chk As CheckBox = headerItem.FindControl(GetGroupHeaderParentCheckboxName(groupDataRow("ParentAppType").ToString(), groupDataRow("ObjectTypeID").ToString(), groupDataRow("ParentID").ToString()))
If (chk.Checked) Then
selectedItemString += String.Concat(groupDataRow("ObjectTypeID").ToString(), KEY_VALUE_DELIMETER, groupDataRow("ParentID").ToString(), SETTING_PAIR_DELIMETER)
End If
Next
In the code above, the groupDataRow variable is Nothing. Can you tell me what I'm doing wrong?
I have other code in this same method that loops through all of the data rows in the grid and gets information from the data rows, and it works fine.
Why can I not access the DataRowView of the GroupHeader?
Thanks,
Michael