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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Detecting columns checked in a grid

Thread ID:

Created:

Updated:

Platform:

Replies:

22673 Dec 18,2004 04:21 AM UTC Dec 19,2004 04:09 AM UTC Windows Forms 4
loading
Tags: GridControl
Steven Hawkes
Asked On December 18, 2004 04:21 AM UTC

I have a column of checkbox''s in my grid. I need to have an event when anyone one of these checkbox''s changes state. How would you suggest I do this? Cheers Steve

Administrator [Syncfusion]
Replied On December 18, 2004 09:07 AM UTC

Have you tried the grid.CheckBoxClicked event?

Steven Hawkes
Replied On December 18, 2004 01:01 PM UTC

>Have you tried the grid.CheckBoxClicked event? Thanks for the quick response Yes, I tried this one and it does work but unfortunately it is fired before the state of the button is changed. I wa actually looking for a post event.

Administrator [Syncfusion]
Replied On December 18, 2004 01:32 PM UTC

If the change is coming from your user, you can use CurrentCellChanged.
private void gridDataBoundGrid1_CurrentCellChanged(object sender, EventArgs e)
{
	GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
	GridStyleInfo style = this.gridDataBoundGrid1[cc.RowIndex, cc.ColIndex];
	if(style.CellType == "CheckBox")
	{
		Console.WriteLine(style.CellValue);
	}
}
If you want to catch changes to your datasource from outside the grid, then you can try some event on your datasource, maybe DataTable.COlumnChanged.

Steven Hawkes
Replied On December 19, 2004 04:09 AM UTC

Thanks for your help, works great. >If the change is coming from your user, you can use CurrentCellChanged. >
>private void gridDataBoundGrid1_CurrentCellChanged(object sender, EventArgs e)
>{
>	GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
>	GridStyleInfo style = this.gridDataBoundGrid1[cc.RowIndex, cc.ColIndex];
>	if(style.CellType == "CheckBox")
>	{
>		Console.WriteLine(style.CellValue);
>	}
>}
>
> >If you want to catch changes to your datasource from outside the grid, then you can try some event on your datasource, maybe DataTable.COlumnChanged.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;