BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi Ramin,
Thank you for using Syncfusion products.
If you want to restrict the cell editing when CurrentCellStartEditing event, you can enable Cancel property based on your condition. Please make use of below code,
Code Snippet:
void gridGroupingControl1_TableControlCurrentCellStartEditing(object sender, GridTableControlCancelEventArgs e)
{
if (style.TableCellIdentity.TableCellType != GridTableCellType.FilterBarCell)
{
If(//Specify your needed condition)
{
e.Inner.Cancel = true;
}
else
{
e.Inner.Cancel = false;
}
}
}
Please let me know if you have any concerns.
Regards,
Neelakandan
Hi Ramin,
Regret for the inconvenience caused.
You can get style of the current cell by using GetTableViewStyleInfo method. Please make use of below code,
Code Snippet:
void gridGroupingControl1_TableControlCurrentCellStartEditing(object sender, GridTableControlCancelEventArgs e)
{
GridTableCellStyleInfo style = this.gridGroupingControl1.TableControl.GetTableViewStyleInfo(e.TableControl.CurrentCell.RowIndex, e.TableControl.CurrentCell.ColIndex);
if (style.TableCellIdentity.TableCellType != GridTableCellType.FilterBarCell)
{
e.Inner.Cancel = true;
}
else
{
e.Inner.Cancel = false;
}
}
Please let me know if you have any concerns.
Regards,
Neelakandan