Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
375
How to find out which datatable is assigend to a band
posted

Hi,

I have to create a view that should be showing two ore more datatables in dynamic relation. That's no problem, yes Smile
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: Customer
Band 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?

Parents
No Data
Reply Children