Welcome Guest Search | Active Topics | Sign In | Register

delete EO.grid item in server side... Options
grchen168
Posted: Wednesday, March 23, 2022 10:51:42 PM
Rank: Advanced Member
Groups: Member

Joined: 8/26/2021
Posts: 47
I am populating my EO.Web Grid's items using CreateItem() in server side.
Now, I want to delete specified item, again, in server side.
I found no related method of Items class for deleting item in server side.
Can you point me how to do ?
Thanks~
eo_support
Posted: Thursday, March 24, 2022 2:56:34 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

The Grid is always populated from a data source. So you would always delete the row in your data source instead. Regardless whether you run the Grid in server mode or client mode, the basic flow is like this:

1. You populate your Grid from the data source;
2. User deletes a row from the Grid;
3. If the Grid is running in server mode, then the page is posted back and the server side ItemDeleted event is triggered immediately; If it runs in client mode, then this delete action is cached until the page is posted back, at which time ItemDeleted event is triggered;
4. Inside ItemDeleted event you would delete the row from your data source;
5. The Grid is repopulated from your data source. Now without the deleted row;

Hope this helps. Please feel free to let us know if you still have any questions.

Thanks!
grchen168
Posted: Friday, March 25, 2022 5:10:42 AM
Rank: Advanced Member
Groups: Member

Joined: 8/26/2021
Posts: 47
Thanks for such helpful info.
eo_support
Posted: Friday, March 25, 2022 7:34:53 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
You are very welcome. Please feel free to let us know if there is anything else.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.