grd.DataSource = ds.Tables["LEVEL_0"];
The resultant grid has 2 bands as expected but both have a datamember and key as LEVEL_0. Why does this happen and how do I get round it? I would expect that one band would be LEVEL_0 and the other LEVEL_1......
If I add a new table (LEVEL_2) and add a relationship with LEVEL_1 and rebind then I get 3 bands (2 called LEVEL_0 and another LEVEL_2). So LEVEL_2 works as expected.
I am using v5.3 of the grid.
Thanks Nish
Hi Nish,
As far as I know, it's not possible for two bands in the same grid to have the same key. So I don't see how this can be happening. How do you know both bands have the same key? How are you getting the DataMember of the band?
It looks to me like you should not be binding the grid directly to the table, anyway. You should probably be binding to the DataSet.
grd.SetDataBinding(ds, "LEVEL_0");
Mike
Thanks for the response. I have tried to attach the watch window to show that the both Band 0 and 1 have the same Key but couldnt but have pasted the result below. I am getting the datamember by using a breakpoint after the Binding and checking each band.
grdBlotter2.DisplayLayout.Bands[0].Key = "LEVEL_0" grdBlotter2.DisplayLayout.Bands[1].Key = "LEVEL_0"
I tried to use the SetDataBinding but still get the same result.
Regards
Nish
That's really weird. The Key of the band comes from the DataSource. So somehow, these names must be what the data source is returning. I coudn't say why. Perhaps you should submit a small sample project to Infragistics Developer Support and let them take a look.
Get Help