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

GGC - How do I leave 1 checkbox checked?

Thread ID:

Created:

Updated:

Platform:

Replies:

88918 Aug 14,2009 01:31 PM UTC Aug 26,2009 12:41 PM UTC WinForms 7
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 14, 2009 01:31 PM UTC

Hi!

I have one GGC on my windows form, and exists one column from type CheckBox with various rows. How do I make to only one CheckBox is checked on the grid?

Thanks!

Ediberto

Administrator [Syncfusion]
Replied On August 14, 2009 02:48 PM UTC

Up!

Adriano Martins Junqueira
Replied On August 17, 2009 05:11 PM UTC

Up!

Administrator [Syncfusion]
Replied On August 19, 2009 01:44 PM UTC

can anyone help me please?

Lingaraj S [Syncfusion]
Replied On August 20, 2009 03:16 PM UTC

Hi Ediberto,

Sorry for the delayed response.

Please try using TableControlCheckBoxClick and RecordValueChanged changed events with conditional statements to achieve your functionality.

Refer the sample from below link:
http://files.syncfusion.com/support/samples/Grid.Windows/7.3.0.20/Forums/GGCCheck.zip

Please let me know if you have any queries.

Regards,
Lingaraj S.

Administrator [Syncfusion]
Replied On August 24, 2009 03:01 PM UTC

Hi Lingaraj

I downloaded your sample but occurs an error while I runs:

'Syncfusion.Grouping.Record' does not contain a definition for 'GetRowIndex' and no extension method 'GetRowIndex' accepting a first argument of type 'Syncfusion.Grouping.Record' could be found (are you missing a using directive or an assembly reference?)

Can you help me?

I´m using the version 6.3.0.30

Thanks

Administrator [Syncfusion]
Replied On August 25, 2009 08:35 PM UTC

Hi Lingaraj,
I solved this problem using the GetSourceIndex() method:

int row = e.Record.GetSourceIndex();

I have a second question.
How do I do mark the checkbox, unmarking the other checkbox when I click other row from other column Value from the example?

Thanks

Ediberto

Lingaraj S [Syncfusion]
Replied On August 26, 2009 12:41 PM UTC

Hi Ediberto,

Thank you for the update.

Please try using CurrentRecord in conditional statement to achive your behavior.

Refer the modified code below:

// Modified RecordValueChanged event
void Table_RecordValueChanged(object sender, RecordValueChangedEventArgs e)
{
if (e.FieldDescriptor.Name =="Value")
{
if (!changing)
{
changing = true;
foreach (Record rec in e.Record.ParentTable.Records)
{
if(rec!=e.Record.ParentTable.CurrentRecord)
rec.SetValue("Value", 0);
}
changing = false;
}
}
}


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

;