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
920
How to select only two rows in UltraWingrid
posted

Hi

I have WinForm grid (version 2014.2) that has multiple selection enabled however I want to restrict the row selection to no more than 2 rows.

Is this behaviour possible?

Any help greatly appreciated.

Regards

James O'Doherty

Solution Database and Architect

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi James,

    That's an easy one:


            private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                UltraGridLayout layout = e.Layout;
                UltraGridOverride ov = layout.Override;

                ov.MaxSelectedRows = 2;
            }

Children