3.2.0

Adding dynamic data

Hi All...

I'm reading the ActiveWidgets documentation, it's a great widget!!.
I think I didn't find the way to add data with JavaScript once the array was loaded to the widget....

My question is, Can I add data in a dynamic form I mean something like to take a value of an input and then put that value in the grid....
Another form may be the grid editable so the user can add a new row and edit that row...

Thanks!
Matutek
May 26,
All you need to do is make the appropriate changes to the Javascript array that the data is in, then call refresh() on the grid. If you add rows to the array then you will also have to make a change to setRowCount before calling refresh. Same is true is you add columns, do a setColumnCount() prior to calling refresh().
Remember that the grid is a visual representation of the data, the data is still the array. Any change to the array will be reflected in the grid once you call refresh().
Jim Hunter
May 27,
Doing this doesn't reset the highlighted row (if you're adding additional rows), but the scrollbar resets to the top of the page...With a quick search, I can't see how to set the position of the scroll bar, but I'll take a deeper look.
Craig Jones
June 1,
Do a quick search on this Forum for ScrollIntoView, this is a nifty way to get the scrollbars and the highlighted row back into sync after data changes.
Jim Hunter
June 1,

This topic is archived.

See also:


Back to support forum