I have a dataset with two tables. Say Customers and Orders. I display the Orders table in the grid, but want a drop down combo for the CustomerID column. Also, I want to display and sort by Customer name from the Customer table. What is the best way to do this. Can it be done both by code and the designer? Thanks.
ADAdministrator Syncfusion Team April 6, 2005 05:44 AM
Take a look at the \Syncfusion\Essential Suite\18.104.22.168\Windows\Grid.Windows\Samples\Grouping\ForeignKeyReference. It does things from code, but I think you should be able to set the same properties via the designer as well.
ADAdministrator Syncfusion Team April 6, 2005 09:25 AM
I followed the example you suggested, but have one problem: The grid shows all columns from the foreign key table in the main grid. Following the example, I added the line
This restricted the columns shown in the drop down grid, but still all columns from the foreign key table was shown in the main grid. How can I restrict the columns shown in the main grid?
ADAdministrator Syncfusion Team April 6, 2005 09:33 AM
Did you try explicitly removing them from the parent''s VisibleColumns (customers.TableDescriptor.VisibleColumns.Remove).
ADAdministrator Syncfusion Team April 7, 2005 03:04 AM
Removing the columns explicitly from the main table worked fine. Now I can have only one column from the Customer table in the main grid and many columns in the drop down grid. Perfect!