I need to deselect a row and select another row from code behind.
I am trying to do it in CellSelectionChanged event of the grid.
I have tried gvLOBList.Behaviors.Selection.SelectedRows.Remove(gvLOBList.Rows(2))
but this seems to be not working.
Any pointers in this regard would be very helpful.
Hi,
Let us know if you still need assistance with this.
Regards,
Lyuba
Developer Support Engineer
Infragistics
www.infragistics.com/support
Please find my code snippet attached. My infragistics Web data grid is gvLOBList.
Unselecting is not working, but selecting is working from code behind.
********************************************************************************************
Private Sub gvLOBList_CellSelectionChanged(ByVal sender As Object, ByVal e As Infragistics.Web.UI.GridControls.SelectedCellEventArgs) Handles gvLOBList.CellSelectionChanged
Dim columnName As String = e.CurrentSelectedCells(0).Column.Header.TemplateId.ToString() Dim selectedIndex As Integer = e.CurrentSelectedCells(0).Row.Index If columnName = "LOB" Then Dim strPage As String = hdfConfirmVal.Value If strPage <> "Same Page" Then selectedLOBDetails = New SubLOBDetailsOutputPE selectedLOBDetails = LOBCollection.Item(selectedIndex) selectedLOBCode = LOBCollection.Item(selectedIndex).LOBCode ShowselectedLOBDetails() Else gvLOBList.Behaviors.Selection.SelectedRows.Remove(gvLOBList.Rows(2)) gvLOBList.Behaviors.Selection.SelectedRows.Add(gvLOBList.Rows(0)) End If
End If
**************************************************************************************************************