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
75
How to capture card view column resize event
posted

Hi,

I have UI which is having two ultra grids placed like top and bottom. Both grids are Cardview setup and if user resize the column width of the top grid i have to resize the bottom grid column width as well so that the UI looks consistence.

For the above scenario i'm trying to capture the column resize event "AfterColPosChanged" but it's not getting triggered when the grids are in cardview but in the default view it's triggered.

Please help me on subscribing the appropriate event for column resize event in cardview  or an approach to achieve it.

Regards,

Sundaram

Parents
  • 7535
    Offline posted

    Hello ,Mee

    Thank you for Posting. In the grid cardview mode when you are talking about resizing the column width I am sure you are talking about adjusting the Width of the card?

    You can't actually resize the columns in CardView, because the columns are displayed as rows, and AfterColPosChanged event is specific to the grid column repositioning/resizing .

    Looking into API I didn't find any specific event fire when we change the card width but you can workaround by using PropertyChanged event .

    Something like this:

    private void UltraGrid1_PropertyChanged(object sender, Infragistics.Win.PropertyChangedEventArgs e)
            {
                var trigger = e.ChangeInfo.FindPropId(Infragistics.Win.UltraWinGrid.PropertyIds.Width);
                if (null != trigger &&
                    trigger.Source is UltraGridCardSettings)
                {
                    Debug.WriteLine("Card Width Changed!");
                }
            }
    

    The downside of that approach is that this event fires any time any property in the grid changes for any reason, So it might slow down the app and cause slow performance but again there is no specific event to handle this.

    Let me know if you have any question.

    Regards,
    Divya Jain

Reply Children