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
775
WinGrid isn't showing + when binding to a recursive datatable
posted

I have a recursive datatable that, when rendered in the wingrid, should show 3 levels of records in a banded format (parent, child, grandchild) with the appropriate records underneath each band. I've defined a data relation for the datatable that looks like something like this:

 

 

 

 

 

 

 

 

 

 

 

_displayDataSet.Relations.Add(new DataRelation("ttSupplyDemandMasterDisplay_ttSupplyDemandMasterDisplay",
new DataColumn[] {
_ttSupplyDemandMasterDisplay.Columns["domain"],
_ttSupplyDemandMasterDisplay.Columns["itemNumber"],
_ttSupplyDemandMasterDisplay.Columns["site"],
_ttSupplyDemandMasterDisplay.Columns["recordType"]},
new DataColumn[] {
_ttSupplyDemandMasterDisplay.Columns["domain"],
_ttSupplyDemandMasterDisplay.Columns["itemNumber"],
_ttSupplyDemandMasterDisplay.Columns["site"],
_ttSupplyDemandMasterDisplay.Columns["parentRecordType"]},
false));

When the wingrid is rendered, however, the + (plus) sign only appears at the top most band. I expected the plus sign to show at the parent and child bands so that when opened up, the parent would show the child bands/records underneath and the child bands would show the grandchild records underneath. Right now it looks like the child and grandchild bands/records are all children of the parent band. I've double checked to make sure my data relation is doing the recursion correctly, and it is. What could be causing the plus sign to not appear for the child bands?

Thanks!

Steve

Steve

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Steve,

    My first suggestion is to make sure you have the latest service release. There was a bug a while back where the grid would only display the first 3 levels of data but that was fixed.

    If that does not help, then my guess is that this might be a problem with the data source. What kind of data source are you using? If you are using a DataSet, then you may need to wrap it inside a BindingSource.

Children
No Data