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
145
ExpandRow symbol comes even if there are no child rows
posted

Hi,

We have a grid for which we assign data with 2 bands. In upper band it shows expand symbol (+) for each row on its row header. Expand symobl is shown for all the rows irrespective of whether the row has child rows or not. It is possible to show expand symbol for the only rows which has child rows. We don't want to show the expand symbol if the row is not having any child rows. Could you tell us the fix for this.  I have attached the sample project to reproduce this issue. Please find the attached sample.

ParentandChildrow.zip
Parents
No Data
Reply
  • 9298
    posted

    Mohammed,

    After you have set the DataSource of your grid insert the following line of code:

    this.ultraGrid1.DisplayLayout.Override.ExpansionIndicator = ShowExpansionIndicator.CheckOnDisplay;

    This will show the Expansion indicator only when there are child rows.  By the way, it is not necessary to call the DataBind method off the grid.  In your sample it is enough to set the DataSource of the grid to ParentList.

    Let me know if you have further questions.

    Michael

Children