How to change Double click on a unselected row behaviour in True DB Grid

Posted by: asif.arshadullah on 21 February 2021, 7:55 pm EST

    • Post Options:
    • Link

    Posted 21 February 2021, 7:55 pm EST

    Current behaviour of True DB Grid for Winforms is that if a user double clicks on a unselected row, the row becomes editable. I want to change this to the following behaviour:

    If a user double clicks on a unselected row, then the row is only selected not editable. But if a user clicks on a selected row, the row becomes editable.

  • Posted 22 February 2021, 5:29 pm EST

    Hi,

    The single-click always fires before double click so you will need to use a timer with the combination of MouseClick and MouseDoubleClick events and wait when the click occurs to see if it was a double click. Once you know if the click was single or double you can perform the required operations. You can use the EditActive property to begin editing if a single click occurred. You can use the Select method to select the row when a double click occurred.

    Please refer to the sample attached. If you need further assistance, please let us know.

    Regards.

    Avnish

    TDBGridClickChange.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels