We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Selection of Row on Form Load

Hi, I am using GDBG. When the form is loaded, the first row is selected by default. Is there any way to deselect the row during the form load and keep the grid unselection. I tried using Model.Selection.Clear() and is not working. Best Regards Ram

1 Reply

AD Administrator Syncfusion Team June 4, 2003 02:03 PM UTC

> Hi, > > I am using GDBG. > > When the form is loaded, the first row is selected by default. Is there any way to deselect the row during the form load and keep the grid unselection. > > I tried using Model.Selection.Clear() and is not working. > > Best Regards > Ram Do you have ListBoxSelectionMode set so the whole row is selected? If that is the case, and you just want the grid to come up without the row selected on the first time, you can handle the event CurrentCellActivating and just cancel the very first activation.
Dim firstTime As Boolean = True
    Private Sub GridDataBoundGrid1_CurrentCellActivating(ByVal sender As Object, ByVal e As GridCurrentCellActivatingEventArgs) Handles GridDataBoundGrid1.CurrentCellActivating
        e.Cancel = firstTime
        firstTime = False
    End Sub

            

Loader.
Live Chat Icon For mobile
Up arrow icon