CellDoubleClick event

Hi,

Does GridDataControl support CellDoubleClick event? How to enable cell level selection?

We would like to trigger some custom action when a cell is double clicked within the grid.


Thanks


Yu



4 Replies

YU Yu June 30, 2014 10:52 AM UTC

It seems the ClickCout of CellClick event arguments is doing the trick.


AR Akila Rajaram Syncfusion Team July 8, 2014 02:13 PM UTC

Hi Yu,

 

Thank you for contacting Syncfusion Support.

 

Query: Double click in GridDataControl?

Yes, you can use CellClick event and using ClickCount property in argument you can differentiate double click.

Code example:

public MainWindow()

        {

            InitializeComponent();

            this.grid.CellClick += grid_CellClick;

        }

void grid_CellClick(object sender, Syncfusion.Windows.Controls.Grid.GridCellClickEventArgs e)

        {

            if (e.ClickCount == 2)

            {

                //code for double click

            }

        }

 

Query: How to enable cell selection?

You can enable the cell level selection by setting ListBoxSelectionMode and AllowSelection properties in GridDataControl .

 

ListBoxSelectionMode="None"

AllowSelection="Cell"

 

Please refer the following sample:

Sample: Observable_Collection_Demo.zip

 

Please let us know if you have any queries

 

Regards,

Akila



YU Yu July 8, 2014 07:13 PM UTC

Thanks a lot. They works well.


AR Akila Rajaram Syncfusion Team July 9, 2014 06:01 AM UTC

Hi Yu,

Thanks for your update,

please let us know if you require further assistance.

Regards,

Akila


Loader.
Up arrow icon