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.
Syncfusion Feedback

How to disable click on a cell or do not allow user click on a cell , but still allow horizontall scroll

Thread ID:

Created:

Updated:

Platform:

Replies:

127415 Nov 15,2016 01:09 AM UTC Nov 15,2016 01:20 PM UTC Windows Forms 1
loading
Tags: GridGroupingControl
Truong
Asked On November 15, 2016 01:09 AM UTC

Hi !

How to disable click on a cell or do not allow user click on a cell , but still allow horizontall scroll

Amal Raj Umapathy Selvam [Syncfusion]
Replied On November 15, 2016 01:20 PM UTC

Hi Truong, 

Thanks for using Syncfusion products. 
 
 
 
 
 
 
 
 
 
 
How to disable click on a cell or do not allow user click on a cell , but still allow horizontall scroll 
Solution 1 
 
The reported scenario of handling the cell click to disable cell click can be done using the TableControlCurrentCellActivating event and we can scroll using mouse click on ScrollBars as well. Please make use of the below code, 
 
Code Example 
//Event Subscription. 
this.gridGroupingControl1.TableControlCurrentCellActivating += new GridTableControlCurrentCellActivatingEventHandler(gridGroupingControl1_TableControlCurrentCellActivating); 
 
void gridGroupingControl1_TableControlCurrentCellActivating(object sender, GridTableControlCurrentCellActivatingEventArgs e) 
    //To cancel CellClick to avoid cell activating. 
    e.Inner.Cancel = true
Solution 2 
 
Cell click which activates the cell editing can be disabled by making grid as BrowseOnly also. Please make use of the below code, 
 
Code Example 
//To set the grid non-editable using Cell Click. 
this.gridGroupingControl1.BrowseOnly = true; 
 
Note 
Enabling the BrowseOnly of Grid will disable editing of cell only and current cell border will be drawn. 
 
Sample Link 
 
Regards, 
Amal Raj U. 


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.

Warning Icon 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.Close Icon

;