Retain the previous checked state of checkboxes after Reload of JqGrid having Multiselect = true - jqgrid

I am developing an application using MVC and I am using JqGrid to display the data.
The JqGrid is inside Views\Shared folder as partial page.
This grid is loaded as partial page in another View (Home.cshtml).
Multiselect option of the grid is set to True so that the first column is shown as Checkbox for all rows.
This Grid is loaded/refreshed in intervals of 2 minutes using Javascript SetInterval.
When I select the checkboxes of the Grid row, the checked state of checkbox is not retained after Grid is refreshed in the intervals of 2 minutes.
Kindly help me with the solution to this problem, the previous checked state of checkbox should be retained after Grid refresh. Thanks.

Related

Kendo grid. Update only current row in popup, even if other was changed

For example I have many many rows which contains 2 columns: checkbox and input, and popup window with editing. In DataSource I have 'Update' event, which call method for updating from controller.
Question: Is it possible to make such situation: User check checkbox on first row -> open popup for second row -> submit changes. Only second row should be updated, not all.
I want pass to server item only from current row. Actual result is that all changed rows passed to method 'Update'
This situation appears because in my application combined "incell" and "popup" editing for Kendo Grid.

slick grid - unheck all rows for paging, sorting and search events

I am using SlickGrid with the checkbox selector plugin and the pagination plugin. I want to only allow the user to select rows for the current page. I noticed that slickgrid remembers values that the user selects on a previous page. Only when a user selects a row on the current page does it uncheck the rows on a previous page. Is it possible to uncheck all rows on a page change event.
Similarly if the user does a search I want to unselect all rows.
Same with sorting, unselect all rows for the grid when the user does a sort.
Is it possible to do this?
The checkbox selector plugin was not designed for pager. Whenever you set checkbox as selected using the plugin, it remembers the row indices _selectedRowsLookup of the grid and re-apply the formatting when the grid invalidates. Thus, it will be the same rows check/unchecked on each page.
To achieve what you want, you have to customize the plugin where you need to:
Add a flag/field isSelected to your dataset that store if a record is selected
Set the formatter to check the dataContext.isSelected instead of using the _selectedRowsLookup
Change the handleSelectedRowsChanged to modify the field isSelected to true or false with the correct reference on the current page.
To select the rows of current page, change handleHeaderClick to only modify the rows displayed using the current pagingInfo
To clear the selection, reset the isSelected field to false and invalidate the grid rows.

Orbeon Repeat Grid Issue Dropdown Issue

In my Repeat Grid I have
1. First Dropdown
2. Second Dropdown
3. Input Area
When I select value from First Dropdown, data of Second Dropdown will be loaded. (I'm using On Value Change Action)
When I click on Plus (+) the value of Second Dropdown of First Row changes!
Similarly if I change any row First Dropdown, the values getting bounded for all the Second Dropdowns. Whatever I selected initially will be reloaded again!
Is this the bug in Orbeon or is there a way to load them differently?
This was the behavior prior to Orbeon Forms 2016.1. You can read more details in issue #1770. You can consider upgrading to Orbeon Forms 2016.1, or using the Dynamic Data Dropdown control as a workaround.

Mark newly added row in Kendo UI Grid

I have a situation that user go to page with Kendo Grid and he can add new item to this Grid. Before he refresh page - new items are visible at the top of the Grid (stantard Kendo UI way)
I want to mark newly added rows, for example I want to have them shown in different colour than the "old' ones.
Is is possible to do this?

Kendo Grid not waiting for toolbar drop down lists to finish before loading

So I have a Kendo grid, that has two DropDownLists (DDL) in the toolbar.
The issue I am having is, the grid is dependent on the two DDLs, one which is loaded via an ajax call. However the grid does its ajax call before the DDL is populated, which leads to a failed call.
How can I force the grid to wait for the DDL to be populated.
Note: I CAN NOT give it a default value.
Thanks
Set autoBind to false. This will create the Grid but not load the data.
Then in the DropDownList dataBound event force the Grid to be loaded by invoking grid.dataSource.read.

Resources