AD
Administrator
Syncfusion Team
December 23, 2005 05:22 PM UTC
Hi Van Baker,
Please refer this sample that shows how to get this working.
http://www.syncfusion.com/Support/user/uploads/GGC_ForeignKeyReference_a924c4a.zip
Best regards,
Jay
VB
vbaker
December 23, 2005 07:00 PM UTC
Thanks, Jay. That is exactly what I needed. I had seen a similar example on Foreign Keys, but was not able to quite follow how it worked. But your example solved my problem.
Merry Christmas!
--Van Baker
AD
Administrator
Syncfusion Team
January 19, 2006 05:38 AM UTC
hi,
This solution successfully worked for me also.
But the problem is that, the drop down now is different from the way it looked earlier.
The difference is the drop down has a column header now , earlier it didnt have. I also dont want borders around the cells in the drop dowm, how to do it?
regards,
catinat
AD
Administrator
Syncfusion Team
January 19, 2006 07:15 AM UTC
hi,
I am able to remove the borders using queryce;;styleinfo event, but how to remove the header. I am adding two pic files showing the differrence.
regards,
catinat
Diff.zip
ST
stanleyj
Syncfusion Team
January 20, 2006 12:07 AM UTC
Hi Catinat,
The column header can be removed through the TopLevelGroupOptions in the TableDescriptor.
GridRelationDescriptor rd = new GridRelationDescriptor();
rd.ChildTableDescriptor.TopLevelGroupOptions.ShowColumnHeaders = false;
Best regards,
Stanley
AD
Administrator
Syncfusion Team
January 23, 2006 06:11 AM UTC
hi,
Given a record, say GridRecord , I want to access the relation columns value, if I use record.GetValue(), I am not able to get the value. Say my parent tabledescriptor has the column called ID and child tabledescriptor has LOOK_UP, and I add a realtion(ID, LOOK_UP) to the parent tabeldescriptor with the primary key, PRIMARY_ID,now given the PRIMARY_ID I need to get the value of relation column, when I use the following code,
foreach(GridRecord r in this.grid.Table.Records) {
if(r.GetValue("PRIMARY_ID") = 1200) {
return r.GetValue("ID") // gives me value of "ID" whereas I want "LOOK_UP
}
}
AD
Administrator
Syncfusion Team
January 23, 2006 01:05 PM UTC
Hi Catinat,
To get a ChildRecord, you need to use the GetRelatedChildTable() method.please try this code
foreach(GridRecord r in this.grid.Table.Records)
{
ChildTable ct = gr.GetRelatedChildTable(new RelationDescriptor("ParentToChild"));
if(r.GetValue("PRIMARY_ID") = 1200)
{
foreach (GridRecord cr in ct.Records )
Console.WriteLine(cr.GetValue("ID")+"---"+cr.GetValue("Name") );
}
}
Thanks
Haneef