select multiple rows on Janus GridEX

6.7k views Asked by At

I want to select multiple rows on Janus GridEX, but selectedItems property cannot be assigned and it's read only. however I can select a specific row by GridEX.Row and set the current selected row, but I cant add a row or any thing like that to select multiple row!

Can anyone help me

Thanks alot, Shahin

1

There are 1 answers

0
Carolyn Van Slyck On BEST ANSWER

First make sure that your grid allows selecting multiple rows. This can either be set in the designer or in code.

gridEX1.SelectionMode = SelectionMode.MultipleSelection;

Now to select rows, use SelectedItems.Add(position) where position is the index of the row in the grid.

GridEXRow row1 = ...;
GridEXRow row2 = ...;
gridEX1.SelectedItems.Add(row1.Position);
gridEX1.SelectedItems.Add(row2.Position);