ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: rgorantla on October 16, 2014, 12:06:37 am

Title: Redo issue and New row issues
Post by: rgorantla on October 16, 2014, 12:06:37 am
Please take a look at the fiddle :

http://jsfiddle.net/rgorantla/Ljd57c1k/1/

Try adding few rows and do undo - until you have no rows

Now click on redo - you will receive an error "Cannot read property '0' of undefined "

Something when you click on add new row.

Can you help me on what am i doing wrong?

Title: Re: Redo issue and New row issues
Post by: paramvir on October 16, 2014, 12:58:47 am
Error is being thrown because ui.rowIndx is undefined in change event.

Corrected one:  http://jsfiddle.net/paramquery/ytq36uox/ after commenting out the change event.

One way to find the cause of such errors is to use pqgrid.dev.js while development and check the call stack when error is thrown.
Title: Re: Redo issue and New row issues
Post by: rgorantla on October 16, 2014, 02:05:10 am
the problem was i am refreshing the row in change event too : $(this).pqGrid('refreshRow', { rowIndx: ui.rowIndx });
commented that out and it is working as expected