HideCurrentCell behavior possible only for some cells in a row ?

Hi.
I'm using the TableDescriptor.Columns[].ReadOnly property to make some cells in a row editable and others not. However, for non-editable cells, the user is able to move the cursor inside which confuses him. Is there any way to make just the non-editable cells behave exactly the same way as when we set the ListBoxCurrentCellOptions as HideCurrentCell ? 

Thanks.

3 Replies

SN Sindhu Nagarajan Syncfusion Team March 12, 2018 02:41 PM UTC

Hi Paulo, 
 
Thanks for contacting Syncfusion support. 
 
By default, in GridGroupingControl, when ReadOnly property is set to True for a particular column, it allows you to move the cursor inside the cell. In order to overcome this issue, e.Inner.Cancel is set to True in TableControlCurrentCellStartEditing event. Please make use of the code and sample below, 
 
Code Example  
//Event Subscription 
this.gridGroupingControl1.TableControlCurrentCellStartEditing += GridGroupingControl1_TableControlCurrentCellStartEditing; 
 
//Event Customization 
private void GridGroupingControl1_TableControlCurrentCellStartEditing(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCancelEventArgs e) 
{ 
    GridTableCellStyleInfo style = e.TableControl.GetTableViewStyleInfo(e.TableControl.CurrentCell.RowIndex, e.TableControl.CurrentCell.ColIndex); 
    if (style.TableCellIdentity.Column.Name == "Name") 
        e.Inner.Cancel = true; 
} 
 
 
Please let us know if you  have any other queries. 
 
Regards, 
Sindhu  



PP Paulo P March 13, 2018 12:33 AM UTC

Hi Sindhu.

Many thanks for your quick reply and for helping to solve my problem.

Cheers.


SN Sindhu Nagarajan Syncfusion Team March 13, 2018 04:08 AM UTC

Hi Paulo, 
 
Thanks for the update. 
 
We are glad to hear that the provided solution resolved your scenario. Please let us know if you have any other queries. 
 
Regards, 
Sindhu   


Loader.
Up arrow icon