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

Adding a button coloumn

Is there a way to add a column of all buttons? I want to have an 'On' and 'Off' button for each row. If so, how can I hook into the on click event?

2 Replies

JL Jason Lui October 16, 2009 09:08 PM UTC

I apologize, I've been asking on the wrong forum. Should be in window forms.


JJ Jisha Joy Syncfusion Team October 19, 2009 10:51 AM UTC

Hi Jason,

Thank you for posting query to us.

You could make a column of type button by setting the CellType to PushButton. you could catch the button click on CellButtonClicked event of GridControl.


this.gridControl1.ColStyles[2].CellType = "PushButton";
this.gridControl1.CellButtonClicked += new Syncfusion.Windows.Forms.Grid.GridCellButtonClickedEventHandler(gridControl1_CellButtonClicked);


void gridControl1_CellButtonClicked(object sender, Syncfusion.Windows.Forms.Grid.GridCellButtonClickedEventArgs e)
{
//Your code here
}

Please let me know if this helps.

Regards,
Jisha

Loader.
Live Chat Icon For mobile
Up arrow icon