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
40
CellClickAction
posted

Здравствуйте,подскажите пожалуйста как сделать выделение строки через несколько позиций.
Например у нас есть 10 строк,я хочу выделить 1,5 и 8 строку,как это можно реализовать?

Parents
No Data
Reply
  • 1700
    Offline posted

    Hello Evgeniy,

    Please note that according to our support policy, we provide support via support cases and forums only in English.

    Regarding your question about selecting multiple non-adjacent rows, this could be done both through the UI and in code behind. If you are using CellClickAction with “RowSelect” value you can click on the row you wish to select and then hold the Ctrl key to select another row, similar to how files could be selected in File Explorer. The same could be done by using RowSelectors, you would simply need to hold Ctrl and click on the selectors of each row you wish to select.

    To select rows in code behind you would need to access the selected rows collection and add those rows there. It could be achieved with the following code:

    this.ultraGrid1.Selected.Rows.Add(this.ultraGrid1.Rows[0]);
                this.ultraGrid1.Selected.Rows.Add(this.ultraGrid1.Rows[4]);
                this.ultraGrid1.Selected.Rows.Add(this.ultraGrid1.Rows[7]);

    Please let me know if you have any questions.

    Regards,
    Ivan Kitanov

Children
No Data