thx a lot Nagarajan for a quck reply,
using this code will dissable cursor on all column cells...but in my application some columns are editable and some not. can u pls help me in this.
Thanks & Regards
Prabhjeet
>Hi Prabhjeet,
Thanks for your continued interest in SYncfusion product. To avoid the cursor inside the cell you have to handle TableControlCurrentCellStartEditing event . Please refer to the following code snippet
void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
Syncfusion.Grouping.Element el = e.TableCellIdentity.DisplayElement;
if (el.Kind == Syncfusion.Grouping.DisplayElementKind.Record && e.TableCellIdentity.Column != null &&
(e.TableCellIdentity.Column.Name == "Type" || e.TableCellIdentity.Column.Name == "Enabled"))
{
e.Style.ReadOnly = false;
e.Style.BackColor = Color.AliceBlue;
}
else
{
e.Style.ReadOnly = true;
}
}
void gridGroupingControl1_TableControlCurrentCellStartEditing(object sender, GridTableControlCancelEventArgs e)
{
e.Inner.Cancel = true;
}
I have attached the sample that demonstrates this completely. You can download the sample from the following page.
http://websamples.syncfusion.com/samples/Grid.Windows/F68173/main.htmPlease refer to the sample and let me know if you have any questions.
Regards,
Nagaraj