Dear all,
If I have two datatables in one dataset, how to setup the relation between these two datatables so that when I assign the dataset to ultragrid1.datasource, there will have two bands?? What should the code be for ultragrid with multiple bands in assigning two datatables relationships???
The line of code that achieves a relationship in a DataSet is below.
dataSet.Relations.Add(dataSet.Tables["Customers"].Columns["customerId"], dataSet.Tables["Orders"].Columns["customerId"]);
If ultragrid1.datasource=dataSet, which belongs to bands[0] or bands[1]??
If you don't specify one, WinGrid will automatically pick the first band provided by the BindingManager in DotNet. So if you want to make sure the grid shows the proper band as Band 0, you should set the DataMember on the grid, along with the DataSource. You can set both at once at run-time using the SetDataBinding method of the grid.