Hi,
I have to create a view that should be showing two ore more datatables in dynamic relation. That's no problem, yes I have loaded the data into a dataset and have added the relations. All is working fine. But now I have to enter different captions for the first column in each band to show the user the type of data shown.For example:Band 0: CustomerBand 1: Offer No.Band 2: Order No.
To hold my code slimline I have implemented only one data definition that include a column called "Designation". In this column one time the name of customer is stored, one time an offer number or an order number. And the customer table is not allways the first or root table.
What I am searching for is to find out which datatable of the dataset is assigned to each band. So I have the possibillity to find out the name of the datatable and switch the caption of the first column in each band dynamically.For example:switch (band.Datasource.Name){ case "Customers": band.Columns["FirstColumn"].Header.Caption = "Customer"; break; case "Offers": band.Columns["FirstColumn"].Header.Caption = "Offer No."; break;and so on....}
Is there any solution for this?
Hi Mike,
is it so easy? It is! I should find out this by myself I think. Shame on me....
Thank you for your help!
Hi Ralf,
It sounds like you should be able to use band.Key.