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

GGC : How to allow one click in column with type checkbox?

Thread ID:

Created:

Updated:

Platform:

Replies:

84101 Jun 29,2009 11:33 AM UTC Jul 2,2009 12:04 PM UTC WinForms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On June 29, 2009 11:33 AM UTC

Hi!

I have a gridgroupingcontrol in my app and I would like allow the user clicks only in a register with check, don´t permiss enables others checkboxes. How do I do this?

Thanks.

Ediberto Alves

Administrator [Syncfusion]
Replied On June 29, 2009 01:38 PM UTC

Anyone?

Lingaraj S [Syncfusion]
Replied On July 2, 2009 12:04 PM UTC

Hi Alves,

Thank you for your interest in Syncfusion product.

If you want to click the check only one time, then please try using Record.Id and conditional statements in TableControlCheckBoxClick event to achieve this

behavior. The Record is maintain the unique Id in GridGroupingControl. The TableControlCheckBoxClick event is fired, when the check box has been clicked in

GridGroupingControl. The Cancel property is used in TableControlCheckBoxClick event to cancel the check box click after the first click.

Refer the code below:

List lis = new List();
void gridGroupingControl1_TableControlCheckBoxClick(object sender, GridTableControlCellClickEventArgs e)
{
e.TableControl.CurrentCell.MoveTo(e.Inner.RowIndex, e.Inner.ColIndex);
GridTableCellStyleInfo sty = e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex);
if (sty.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Record)
{
if (lis.Contains(sty.TableCellIdentity.DisplayElement.GetRecord().Id))
{
e.Inner.Cancel = true;
}
else
{
lis.Add(sty.TableCellIdentity.DisplayElement.GetRecord().Id);
this.gridGroupingControl1.Refresh();
}
}
}


Refer the sample in below link:
http://files.syncfusion.com/support/samples/Grid.Windows/Forums/CheckBoxGGC.zip

Please let me know if you have any queries.

Regards,
Lingaraj S.

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

;