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. Image for the cookie policy date

foreign key relation...urgent

Hi,

I have 3 tables named Company,ComapnyManager,CompanyProduct as follows,

Company Table:
Companyid name address
1 kk add1
2 gg add2
3 hh add3

ComapnyManager:
CompanyId ManagerId Name
1 1 name1
1 2 name1
2 3 name1
3 4 name1

CompanyProduct:
Id empid prodid name
1 1 1 prod1
2 1 2 prod2
3 1 3 Prod3
4 2 1 prod1
5 2 4 prod4


I want to display Company table data in grid grouping control, and its related product information should be displayed in the same table as product combo column, not as child grid.
And Manager information as a child table which i am able to.

But when i am giving foreign key relation between Company and product table,the product column is not been displayed.
when i am giving related master relation between these two tables,product column is getting displayed but as a child grid,which i dont want.

it should be displyed as in same Company table grid with new column as product and for each Company related product information only, in combo cell type.

Please help me..

1 Reply

JB Jaffersathick B Syncfusion Team January 18, 2010 12:42 PM UTC

Hi Santhosh,

Thank you for using Syncfusion products.

We suggest you to add the combo column using the ItemTemplate in QueryCellStyleInfo event add bind with the datasource for the same. So that you will get the Product information in the combo column. While getting the product information pass the companyId in the function and fetch the related records from it.

Please refer the link below for adding ItemTemplate in the QueryCellStyleInfo event:

http://help.syncfusion.com/ug_74/gridweb/CreatingTemplates.html


Let me know if you have any queries.

Regards,
Jaffer.B

Loader.
Live Chat Icon For mobile
Up arrow icon