How to show checkbox disabled for some rows in Vaadin Grid when using <vaadin-grid-selection-column> - vaadin-grid

My Polymer custom element has a Vaadin grid with say 10 rows.
It allows selection of rows using vaadin-grid-selection-column, which renders checkboxes bound to the selection state of the grid on every row.
I need to:
allow selection of say only 8 rows based on some condition.
disallow selection for the balance 2 rows (either not show the checkbox or show it as disabled).
I am not sure if
<vaadin-grid-selection-column auto-select></vaadin-grid-selection-column>
can be conditioned in any way to achieve the result.
I appreciate any suggestions..

You can generate your own checkboxes in a renderer function. Check similar issue and solution in How to hook data-grid events in parent lit-element component?

Related

Kendo grid. Event when selection is become empty

I need some event when my Kendo grid lose selection (no row selected).
https://dojo.telerik.com/#nick_kingston/IjIYOduw
Select one or more rows.
Filter by some field that so no selected rows show.
Expecting event appearance because now no row selected.
How to implement item 3?
There is no event like lostSelection. The change-event triggers if the user changes the selection only.
Once the filter was executed, the dataBound-event is triggered (as you can see on the demo page https://demos.telerik.com/kendo-ui/grid/events). There you could check for the list of selected items with the method select (https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/methods/select)

Kendo ui - Spreadsheet - how to disable an entire row (not cell) based on a condition?

I have a kendo ui spreadsheet which I would like to display remote data and based on a value disable an entire row to prevent user form editing it rather than a cell. Is there any way todo this?? Similar like inline edit for a kendo grid but in this case I would like to edit only certain rows within the spreadsheet??
You could use a range and then disable the whole range. As presented here:
https://demos.telerik.com/kendo-ui/spreadsheet/disabled-cells but with rows rather then columns.

Get checkbox checked event in gridview

I have a gridview with one column of checkboxes and other columns with different custom controls .
What I want is that when a checkbox is checked an event is triggered which toggles the visibility of other elements in the row .
You can use the approach, illustrated in the http://www.devexpress.com/example=E2284 Code Central example as a starting point to accomplish this task.

How to make only single row selected in telerik radgrid detailtables?

currenetly, I am using the telerik Radgrid control to build a grid. my grid have two levels ( mastertableview and detailtables). In detailtables, there is a gridclientselectcolumn to show a checkbox.
What i want to do is to make only one row selected at each time. That means, when I select a row in a detail table, the other one selected previously need to be deselected.
The allowrowselecting and muliplerowselect are only used to control the mastertableview. Now i need a way to control the detail tables.
Thanks
Recently I bumped into a How-to topic from the Telerik AJAX docs that may match your case or become the core of your logic, too - check it out.

jqGrid using radio buttons for editable rows

I'm currently using jqGrid and ASP.Net MVC. With my current project, my goal is to provide a grid of data to the end user, and they can then edit this. The data is machine-generated, and the users will be confirming if the machine is correct or not.
I think ideally for speed, I'd like to provide a row per item, with a radio button group as the editable. The users could then pick from the values 'Unknown', 'Correct', 'Incorrect'.
As there will be a lot of data, I'd also like to provide a control of some type that can set all rows in the grid to one of the available radio button choices, for the user experience.
Given that there seems to be no native support for this in jqGrid, I wanted to ask if anyone has had any experience writing something like this, and whether this is achievable and reliable, or whether I should stick with the drop-down editable approach that is native to jqGrid.
To implement radio button as the editable instead of the standard drop-down editable approach you can use so named custom editing feature of jqGrid (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:common_rules#custom). This allows you to create any custom control to edit the cell value. An example of the implementation you can find here: Add multiple input elements in a custom edit type field.
To set all rows in the grid to one of the available radio button choices you can use either a control outside of jqGrid or add an additional custom button in the navigation bar (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_buttons). If you search for navButtonAdd you will find a lot of examples how to implement this, for example, Jqgrid: navigation based on the selected row. Because you use server based data, you can just call a method on the server to make the changes which you need and then call trigger("reloadGrid") to refresh jqGrid data.

Resources