Skip to main content
15-Moonstone
Mar 8, 2018 12:32 PM UTC
Question

Is there a way to restrict max no of rows selection in a grid.

Hello,

I have the data bound to a grid with column1(string),column2(checkbox).

we have around 32 rows.

I should allow max 16 rows to be checked and allow only 16 rows to be passed as parameter to the service.

Can we achieve it in the grid.

Also if there are any other option, how can i do it.

 

 

Thanks

Sunay

5 replies

1-Visitor
Mar 8, 2018 2:52 PM UTC

Not out of the box with the grid widget, you may think of an UI with two grids, one for selected rows and the other with available rows, and you can move the rows from one grid to the other, that way you can limit to whatever you want ( as you will need a service to build the Selected Rows Grid )

Translate
Emeritus
Apr 5, 2018 12:21 PM UTC

Hi Sunay,

Did Carles reply solve your issue? If so, could you mark this as an Accepted Solution, and if not, let us know what the current situation is?

 

Thanks!

Leigh

Translate
sbt15-MoonstoneAuthor
15-Moonstone
Apr 6, 2018 2:06 PM UTC

Carles,

Current situation is, i am processing the top 16 selected rows irrespective of the no of rows selected.

But i tried with two grids, after every selected checkbox, i have pushed the row to other grid, but what should i do if the user selects 17th check box..?

 

Thanks

Sunay

Translate
1-Visitor
Apr 6, 2018 2:07 PM UTC

Same as you said, just add only the 16 first.

Translate