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
2715
Programmatically adding a second band
posted

Hi!

I'm having an editable grid with 2 bands.Considering the values in the child table, some rows have a second band, others don't.

For theese who don't i wish to have a button at the end of the row, and when clicked to expand a second band for that row, where the user could insert data.

Any advice on this ?

Thank you!

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

    Are you saying that you only want the user to be allowed to add child rows if there are none already? Or do you want them to be allowed to add child rows to any row?

    For the latter, the easiest thing to do is to set the AllowAddNew property on the band's Override (or the DisplayLayout.Override) to TemplateOnBottom, or one of the other template options.

    For the former, you could add an unbound column to the grid, set it's style to Button, and then handle the ClickCellButton event on the grid. Inside the event you would have to add a row to the child band by calling the AddNew method on the band.

Children