AD
Administrator
Syncfusion Team
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