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
1510
How to choose which level to add in the e.Layout.AddNewBox ?
posted

Hi there!

I have a WinGrid with 3 levels

e.g.
Parent 1
     - Parent 2 ( child 1 )
              - Parent 3 ( child 2 )

and I only want the last level ( Parent 3 / child 2 ) to have the "AddNewBox"
- How would I do that ?

With this ... the user is able to addNew on every single level ...

e.Layout.AddNewBox.Hidden = false;
e.Layout.AddNewBox.Appearance.ForeColor = Color.Black;

rgd,
EE. 

Parents
  • 469350
    Offline posted

    Hi,

    I don't think you can hide the buttons in the AddNewBox, but they will be disabled if you disable AddNew on those bands. You do this via the band.Override.AllowAddNew property.So you could set AllowAddNew on the first two bands to none and that would disable those two AddNew buttons in the AddNewBox.

    The AddNewBox is really a pretty outdated UI, anyway, though. So another option would be to set AllowAddNew on the third band to TemplateonBottom or one of the other template addrow styles and leave the AddNewBox hidden.

     

Reply Children