on ‎2008 Aug 21 7:54 PM
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
Request clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.