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.

Getting the Checkbox value

Thread ID:

Created:

Updated:

Platform:

Replies:

26518 Mar 24,2005 04:06 AM Mar 24,2005 05:35 AM Windows Forms 2
loading
Tags: GridControl
Muthu Swamy
Asked On March 24, 2005 04:06 AM

Hi, I have included a "checkBox" column in the GridDataBoundGrid. The grid is displaying the datasource and the column has checkbox. Now my problem is to get the value for the click event of the checkbox column. And how do I know whether the checkbox has been checked or not?(I mean the status of the CheckBox). MS

Administrator [Syncfusion]
Replied On March 24, 2005 04:48 AM

In a CheckBoxClick event, here is code that displays the new value.
private void gridDataBoundGrid1_CheckBoxClick(object sender, Syncfusion.Windows.Forms.Grid.GridCellClickEventArgs e)
{
	bool newValue;
	object oldValue = this.grid[e.RowIndex, e.ColIndex].CellValue;
	if(oldValue == DBNull.Value)
		newValue = true;
	else
		newValue = !(bool)oldValue; //flip the true/false
	Console.WriteLine(newValue);
}

Muthu Swamy
Replied On March 24, 2005 05:35 AM

Clay, working fine. thanks MS. >Hi, > >I have included a "checkBox" column in the GridDataBoundGrid. > >The grid is displaying the datasource and the column has checkbox. > >Now my problem is to get the value for the click event of the checkbox column. > >And how do I know whether the checkbox has been checked or not?(I mean the status of the CheckBox). > >MS

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.

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.

;