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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Getting the Checkbox value

Thread ID:

Created:

Updated:

Platform:

Replies:

26518 Mar 24,2005 09:06 AM UTC Mar 24,2005 10:35 AM UTC WinForms 2
loading
Tags: GridControl
Muthu Swamy
Asked On March 24, 2005 09:06 AM UTC

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 09:48 AM UTC

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 10:35 AM UTC

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.

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

;