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. Image for the cookie policy date
close icon

Enable/Disable of cell buttons

Hi,
I have pushbutton in my Grid which I need to enable/disable. I tried using the
GridStyleInfo properties of Enable/clickable.
Enable does not seems to work at all, clickable works where it does not generate the user click action. But the color of the button remains the same whether it is enabled or disabled. So the user can't make out whether it is enabled or disable.
I am also using the xp office themes.

Please advice.

thanvir

1 Reply

JS Jeba S Syncfusion Team August 21, 2007 04:42 AM UTC

Hi Thanvir,

Thank you for your details.

Please refer this code snippets to enable and disable PushButton cells.

//Disable Push Button
this.gridControl1.ColStyles[2].CellType = "PushButton";
this.gridControl1.ColStyles[2].Description = "Push button";
this.gridControl1.ColStyles[2].TextColor = SystemColors.Control;
this.gridControl1.ColStyles[2].Enabled = false;
this.gridControl1.ColStyles[2].Clickable = false;

//Enable Push Button
this.gridControl1.ColStyles[3].CellType = "PushButton";
this.gridControl1.ColStyles[3].Description = "Push button";
this.gridControl1.ColStyles[3].Enabled = true;


Please refer the sample which implements the above said feature:
http://websamples.syncfusion.com/samples/Grid.Windows/F67389/main.htm

Kindly let us know if you need any further assistance.

Thank you for using Syncfusion Products.

Best Regards,
Jeba.

Loader.
Live Chat Icon For mobile
Up arrow icon