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
265
Refresh single row
posted

Hello,

I need help with the following scenario:

I bind an igGrid to OData and use SignalR to get information about data changes.

I want to reflect those changes in the grid.

I tried Knockout but there are two problems. First, I cannot bind an igGrid with Knockout extensions to OData. Second, even if I fill an ObservableArray with JSON data manually, it is very slow when it reaches 1000 records.

I tried using "setCellValue" of igGridUpdating, but also two problems: First, the grid looses its selection when calling "setCellValue". (It should not have any impact on what the user is doing.) Second, it creates a transaction with is not nesseccary.

I tried changing the data in the data source (no OData for the test) and called "dataBind" - worse - selection, filter, sorting gets lost.

For my question, imagine the following example:

- A grid bound to OData: Id, Description, Value

JavaScript gets notified with a change:

- Id = 10, Value = 100

What I want to achieve:

- Lookup the record with Id = 10 in the DataSource and / or Grid, change its value to 100 and reflect this value in the visible grid, without affecting what the user has done or is doing with the grid - like selection(s), sorting.

I was thinking of implementing a custom DataSource but I have not found a way to tell the grid "the row with Id = 10 has changes - get its new values and update the DOM".

Any idea?

Btw, the same scenario should be quite common: Display some properties from the OData source in the grid (using $select), an Edit button opens a Dialog, fetches the complete object, the user edits the data, saves it to the data store... and then the grid should reflect the changes that the user just performed in the dialog.

Best regards,

Peter