Thank you very much,
Now I am able to find out the parent and child on gridview_value changed event but need small help I want when user deselects the parent check box (first column) all the child check boxes should be unchecked automatically. For this I have implemented the code as below
Private Sub RadGridView1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadGridView1.ValueChanged
Try
If RadGridView1.CurrentCell Is Nothing Then
Exit Sub
End If
If TypeOf RadGridView1.CurrentCell Is GridCheckBoxCellElement Then
Dim editor As RadCheckBoxEditor = TryCast(sender, RadCheckBoxEditor)
If RadGridView1.CurrentCell.ViewTemplate Is RadGridView1.MasterGridViewTemplate Then
If Not editor Is Nothing AndAlso CBool(editor.Value) = False Then
Me.RadGridView1.GridElement.BeginUpdate()
Dim rowIdx As Integer = RadGridView1.CurrentCell.RowIndex
Dim rowInfo As GridViewDataRowInfo = RadGridView1.MasterGridViewInfo.Rows(rowIdx)
Dim childRows As GridViewRowInfo() = RadGridView1.MasterGridViewTemplate.ChildGridViewTemplates(0).GetChildRows(rowInfo)
Dim expandedState As Boolean
expandedState = rowInfo.IsExpanded
rowInfo.IsExpanded = True
If childRows.Length > 0 Then
For i As Integer = 0 To childRows.Length - 1
MessageBox.Show(childRows(i).Cells(0).Value.ToString)
childRows(i).Cells(0).Value = False
MessageBox.Show(childRows(i).Cells(0).Value.ToString)
Next
End If
rowInfo.IsExpanded = expandedState
Me.RadGridView1.GridElement.EndUpdate()
End If
Else
End If
End If
Catch ex As Exception
End Try
End Sub
End Class
Message box is showing true (before update) and false (after update) but in UI, the child check box not getting unchecked (May be not refreshed) how can I achieve this
Could you please suggest me on this.
Thanks,
Praveen kumar Palla.