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

checkbox in GGC

Thread ID:

Created:

Updated:

Platform:

Replies:

43970 May 10,2006 05:10 AM UTC May 10,2006 01:46 PM UTC Windows Forms 3
loading
Tags: GridControl
brijeshkhare
Asked On May 10, 2006 05:10 AM UTC

hi friends i want if i check the checkbox of child table then checkbox of parent table become automatic checked. is there any way for this.

Administrator [Syncfusion]
Replied On May 10, 2006 09:58 AM UTC

Hi, Could you try this code in TableControlCurrentCellChanged Event.Here is a code snippet. Element el = e.TableControl.Table.CurrentElement ; Record child = el as Record ; if(child != null) { object obj = child.GetValue("Check1"); if( obj != null && obj.ToString() != string.Empty) { bool checkValue = (bool)child.GetValue("Check1"); if( checkValue ) { Record Parent = el.ParentChildTable.ParentNestedTable.ParentRecord as Record ; if(Parent != null) { Parent.SetValue("Check",true); } } } } Here is a sample. http://www.syncfusion.com/Support/user/uploads/GetNestedTableValue_7a61a181.zip Please let me know if this helps. Thanks for your interest in Syncfusion Products. Best Regards, Haneef

brijeshkhare
Replied On May 10, 2006 11:33 AM UTC

>Hi, > >Could you try this code in TableControlCurrentCellChanged Event.Here is a code snippet. > >Element el = e.TableControl.Table.CurrentElement ; >Record child = el as Record ; >if(child != null) >{ > object obj = child.GetValue("Check1"); > if( obj != null && obj.ToString() != string.Empty) > { > bool checkValue = (bool)child.GetValue("Check1"); > if( checkValue ) > { > Record Parent = el.ParentChildTable.ParentNestedTable.ParentRecord as Record ; > if(Parent != null) > { > Parent.SetValue("Check",true); > } > } > } >} > >Here is a sample. >http://www.syncfusion.com/Support/user/uploads/GetNestedTableValue_7a61a181.zip > >Please let me know if this helps. > >Thanks for your interest in Syncfusion Products. >Best Regards, >Haneef hi haneef thanks for replay it is working but sometimes it create problem like when you click on 2 times then it checked the checkbox and sometimes it is not checking the parent checkbox .remember that i am also using query value,save value event for both main table and child table .it is in vb.net

Administrator [Syncfusion]
Replied On May 10, 2006 01:46 PM UTC

Hi brijeshkhare, You need to refresh the parent record after changing the value in the TableControlCurrentCellChanged event.Please refer to the attached sample for more details. Here is a sample. http://www.syncfusion.com/Support/user/uploads/UnboundCheckboxGridGroup_3c64883d.zip Could you please run this at your end and let me know how it goes? Thanks for your patience. Best Regards, Haneef

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

;