Load XML without server side Knowldege

I have a one scenario in our project.

If a row is selected and click one button

the remaining rows are should be changed in grid itself without the server side knowledge.

for Example:


I have 2 columns in grid

and 3 rows. These rows and columns are get from the database. I am using JSP and Struts Application for Loading Data in Grid

RowId Taskname


1.1 task1

1.2 task2

1.3 task3

if suppose I selected the Row 1.2 and click a Indent button

At the time I have to change the Grid row values 1.2 to 1.1.1, 1.3 to 1.1.2

without the knowledge of database… There should not update in database…

How can I load the XML with these changes without page refresh…

When click the save button then only it saved in database.

Please Help me in this situvation

Thanks and Regards


You can change values on client side by using

In case above it can be done as

function indent(row_index){
    var start_value=grid.cells2(i,0).getValue()
    for (var i=row_index; i<grid.getRowsNum(); i++){
       grid.cells2(i,0).cell.wasChanged=true; //mark cell as updated, so it will be saved in DB later

How to get the particular column value from selected Row in grid

for eg

Row  TaskNo  Task Name


1        1.1      Testing

2         2.1      Design

3        2.2        Coding


if suppose I selected the 2nd row… How can I get the Taskno 2.1 in my Grid


You can get value of cell as

    var value = grid.cells(grid.getSelectedId(),1).getValue();

where 1 - index of columns ( indexes are zero based, so for second column it will be 1 )