简体   繁体   中英

Infragistics.Win.UltraWinGrid events

In the Infragistics, is there any event which could catch "After column's pin is changed" for the UltraWinGrid?

For the pin icon, it toggles 'Fixed' of the column of the grid.

I tried to use MouseClick, but it is triggered "Before Column Fixed Changed" instead of "After Column Fixed Changed".

I tried to use AfterColPosChanged, but it is triggered during form init, which is not expected too.

Thanks.

The correct event is AfterColPosChanged. However if you do not need to fire this event during initialization of the grid you can turn off this event via grid's EventManager when the initialization starts and turn it back on when initialization is over.

You can also use the mouse events, but you should try MouseDown and MouseUp. This is the order of the events when user clicks over the pin button:

MouseDown
BeforColPosChanged
AfterColPosChanged
MouseUp

Edit

If you prefer to use EventManager you should turn off the events in the beggining of load_page and turn it on in the end like this:

private void Form1_Load(object sender, EventArgs e)
{
    this.ultraGrid1.EventManager.SetEnabled(GridEventIds.AfterColPosChanged, false);
    // TODO: your code here
    this.ultraGrid1.EventManager.SetEnabled(GridEventIds.AfterColPosChanged, true);
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM