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

Getting Grid Records

Thread ID:





43534 Apr 25,2006 04:36 PM UTC Apr 26,2006 04:10 AM UTC WinForms 1
Tags: GridControl
Chris Wescott
Asked On April 25, 2006 04:36 PM UTC

Hi, I have a ggc with a P-C relationship. I need to get all the parent filtered records and child filtered records so that I can put them into a dataset for further processing? BackGround: Essentailly, my grid shows the user data that they can then select via a checkbox and I need to then get all the checked parents and children and pass it to a web service via a dataset so that the user will receive the selected records. What is the proper method of doing this. Regards, Chris Wescott

Administrator [Syncfusion]
Replied On April 26, 2006 04:10 AM UTC

Hi Chris, Colud you try this code to get the checked checkbox value record in a grid .Here is a code snippet GridTableControl tc = this.gridGroupingControl1.GetTableControl( "ParentTable"); string s = string.Empty; string parents = string.Empty; foreach(Record r1 in tc.Table.Records) { object obje = r1.GetValue("Check") ; if( obje != null && obje.ToString() != string.Empty) { bool checkValue = (bool)r1.GetValue("Check"); if( checkValue ) { parents += r1.Info + Environment.NewLine; } } foreach(Record r in r1.NestedTables[0].ChildTable.Records) { object obj = r.GetValue("Check1") ; if( obj != null && obj.ToString() != string.Empty) { bool checkValue = (bool)r.GetValue("Check1"); if( checkValue ) { s += r.Info + Environment.NewLine; } } } } MessageBox.Show( "Child Record Details:"+ Environment.NewLine +s + Environment.NewLine + Environment.NewLine + "Parent Record Details:" + Environment.NewLine + parents , "Checked CheckBox Records"); Here is a sample. http://www.syncfusion.com/Support/user/uploads/GetNestedTableValue_19c0576.zip For more details, See the forum thread. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=43416 Please let me know if you need any further assistance. Regards, Haneef


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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