cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

igrid displaying deleted row on browser refresh

Former Member
0 Likes
360

Hi Guys,

I am deleting a row from iGrid using delete row(). but when I click applet refresh, the deleted row is again displayed. Please let me know how to make the set of records not to display. Do I need to use session in this case.

Regards

Mallik

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Likes

Hi Mike ,

I have the same requirement to display all rows only when we request to dispaly all rows like a filter used to display selected rows ..can you please explain me in breif . can we use the UpdateEvent here.

Former Member
0 Likes

hi,

ok, i have got your point.

if you just want to delete the row in the UI level, so the method: grid.getGridObject().deleteRow(row) will help you. you said that when you refresh the applet you once again get the deleted row appears in your grid. i think that is absolutely yes. because when you refresh the applet , it will reload the data from the db, or from the query you have used.

may you can try like this:


function Hide()
{
            var row = grid.getGridObject().getSelectedRow();
            grid.getGridObject().deleteRow(row);
}


function Show()
{
          grid.updateGrid(true);

}

have a nice day!

Edited by: Jeremy Good on Aug 22, 2008 12:58 AM

agentry_src
Active Contributor
0 Likes

You may also want to modify the query to exclude that row.


Select * from myQuery
Where RowID not in '[Param.1]'

Leave Param.1 empty to begin with. Then simply use the RowID (or whatever means to identify the 'deleted' row) from the record in the iGrid. Again the browser refresh will wipe the deletion out, but you can keep refreshing the iGrid and exclude the records that you 'deleted'. You will have to set up a comma delimited string variable in your javascript to pass in Param.1 (using setParam method). As long as you keep appending RowIDs to the variable, you can keep adding rows to be 'deleted'.

Good luck,

Mike

Edited by: Michael Appleby on Aug 22, 2008 1:18 PM

Former Member
0 Likes

Hi

thanks for the reply ..

Its not that i want to delete the row completely from database using the command sql query to delete it .but i just want to delete row temporaly from Grid dispaly and make it reappear when i want to like when i select the button or whatever to redisplay all the row....

Former Member
0 Likes

hi,

the deleteRow(ROWNUMBER) function will not change the background db, it just works in the ui level.

so if you want to change or delete the db, you should have a query to handle this.

and here is a post you can refer to

have a nice day

agentry_src
Active Contributor
0 Likes

Mallikarjun,

The delete affects the iGrid object, not the underlying data. When you perform a browser refresh, it recreates the original dataset and displays it in a new iGrid object. So the deleted row seems to reappear.

If you wish to delete the underlying row of data from your data source, you will need to execute a delete command query.

This was discussed not too long ago in another posting: [iGrid Deletions|]

Hope this helps,

Mike

Edited by: Michael Appleby on Aug 21, 2008 9:09 PM