jQWidgets Forums
Forum Replies Created
-
Author
-
October 6, 2015 at 9:22 pm in reply to: Highlight and autoscroll to newly added row Highlight and autoscroll to newly added row #76487
Note for anyone referring to this post. ensurerowvisible requires a visible index, that is, which row of the grid is displaying the data. The documentation currently says to pass the bound index, which is not right. (Reference: http://www.jqwidgets.com/community/topic/ensurerowvisible-should-accept-bound-index/)
The jsfiddle above does work, but only if the grid is not being sorted. You can see this by running it, clicking on a column header to sort, then add some rows with the button. The grid will not always scroll to the correct row.
I was able to work around this by calling getrows. This seems to return the list of rows in sorted order (not sure if that’s documented anywhere.) Then I searched that list to find where my new row ended up. That index could then be passed to ensurerowvisible.
October 6, 2015 at 2:35 pm in reply to: custom widgets not responding in ever present row custom widgets not responding in ever present row #76475> It is wrong to call updatebounddata when you add a new row.
Peter, can you elaborate on when/why this is wrong? A scenario where this might be useful: after saving the data, call commit(true), then reread one or more rows from the server.Thanks,
MattSeptember 21, 2015 at 12:54 pm in reply to: jqxGrid rowupdate commit(false) – any way to resume user edits? jqxGrid rowupdate commit(false) – any way to resume user edits? #76050Thanks for the quick reply.
I recognize that implementing column validations in the client is a valid approach for some projects, but in our project the backend is a a RESTful service that must validate everything sent to it. So we’d rather keep the client validations to a minimum rather than duplicate all the validations. (This also reduces the amount of data the client needs to fetch.)
Given this design constraint, back my original question. The two options I’m seeing are:
1) Use a popup window to edit the row.
2) Let the user leave the row but mark it edited. Keep track of all changed rows, and put a Save button under the grid. The Save function would update each row as it gets successfully saved.Comments welcome.
-
AuthorPosts