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
415
UltraWinGrid.UltraGrid - AddNewBox button events
posted

Hi,

I am using UltraWinGrid.UltraGrid control. The data is in hierarchy format in the grid. AddNewBox is added for that control. I want to hide some of the AddNewBox buttons from the grid. Is there any option to hide those buttons? And I want to track which AddNewBox button event is firing.

Help me regarding this.

Thank you for your time.

Prathap Reddy

Parents
  • 69832
    Offline posted

    You can hide the AddNewBox by setting UltraGrid.DisplayLayout.AddNewBox.Hidden to true (actually I thought it was hidden by default, so you might be setting it to true somewhere without realizing it).

    The grid's AfterRowInsert event will fire when a row is added this way, but I don't see anything on the event arguments that distinguishes a row added in this manner from some other method. You could, however, use the IUIElementCreationFilter interface to intercept the creation of the AddNewRowButtonUIElements (that represent the addnew buttons in the user interface), and handle their ElementClick event. In the event handler, you would upcast the Element property of the event arguments to this type, from which you can get a context on the associated UltraGridBand using the GetContext method, passing in typeof(UltraGridBand).

     

Reply Children
No Data