:: Forum >>

Question about adding a new row and refresh the table.

I want to add some new rows to the table. After that the table has to be refreshed. How can I do it.

Right now, the data is storing as a array:

myData = [ [] , [] ];
....
obj.setDataProperty("text", function(i, j){return myData[i][j]});

How can I add a new row and refresh after that?

Thanks,
flashsnake
Wednesday, May 3, 2006
Please look at /examples/new/add delete row.htm
Alex (ActiveWidgets)
Wednesday, May 3, 2006
Assign ur values to a new Array
var myTempData= new Array();
for(var arrayIndex=0;arrayIndex<indexlength;arrayIndex++)
{
myTempData[arrayIndex][1]=78;
myTempData[arrayIndex][2]=45;
}

Assign the new Array to ur Grid data and refresh it. Works 4 me!!
top.opener.top.myData = myTempData;
top.opener.top.content.cobj.setSelectionProperty("index", -1);
top.opener.top.content.cobj.setRowProperty("count",myTempData.length);
top.opener.top.content.cobj.setEvent("onclick",function(){});
top.opener.top.content.cobj.refresh();
Dhivya Suresh
Friday, July 7, 2006
Thanks for your comment. One problem is the sorting doesn't run correctly. Some of the columns (not all) are not in correct order. Do you have idea?
flashsnake
Friday, July 7, 2006
I have a javascript error on my grid when I refresh the table after sorting any column.
flashsnake
Monday, July 31, 2006
Find the solution by adding

--> obj.setRowProperty("value", function(i){return i});
obj.refresh();

Cheers

flashsnake
Tuesday, August 1, 2006

This topic is archived.


Back to support forum

Forum search