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.
Unfortunately, activation email could not send to your email. Please try again.

Selection of Row on Form Load

Thread ID:

Created:

Updated:

Platform:

Replies:

4850 Jun 4,2003 09:39 AM Jun 4,2003 10:03 AM Windows Forms 1
loading
Tags: GridControl
Ramu
Asked On June 4, 2003 09:39 AM

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

Administrator [Syncfusion]
Replied On June 4, 2003 10:03 AM

> 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
 

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;