.netinfragisticsultrawingrid

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.


Solution

  • 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);
    }