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.

GridControl WPF, CellClick

Thread ID:

Created:

Updated:

Platform:

Replies:

104409 Jul 17,2012 06:45 AM Jul 18,2012 01:41 AM WPF 1
loading
Tags: GridControl
xi wang
Asked On July 17, 2012 06:45 AM

Hi,

There is a strange behavior of the GridControl.

When I click on a cell, it is immediately highlighted (e.g. border of the cell is highlighted) then the cell click event is fired, no matter what I do, I cant get rid of it, any ideas?


Rajasekar [Syncfusion]
Replied On July 18, 2012 01:41 AM

Hi Wang,

 

Thank you for your update.

 

Yes, whenever you click on the any cell, the selection will be drawn immediately to set the current cell  because without setting current cell prior to the Click event, you cannot  access the current cell in the CellClick event of the GridControl. This is our default behavior.

 

Suppose, if you are interested to cancel the selection changes means, then you can achieve this by handling the SelectionChanging event of the GridControl.Model like shown below.

 

        this.grid.Model.SelectionChanging += new GridSelectionChangingEventHandler(Model_SelectionChanging);
 
        void Model_SelectionChanging(object sender, GridSelectionChangingEventArgs e)
        {   
            e.Cancel = true;
        }

 

Please let us know if you have any queries.

 

Thanks,

Rajasekar


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.

;