I m making a table at run tme I m adding some row at runt time. I stored that table in a session.
Session["MyTable"]
I want to delete a record from that table n again into a DataGrid
I m making a table at run tme I m adding some row at runt time. I stored that table in a session.
Session["MyTable"]
I want to delete a record from that table n again into a DataGrid
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mahesh ChandPosted May 13, 2008, 11:28 AM
You first need to convert Session object into a DataTable and then find that row you want to delete and delete it using Rows.Delete method. After that, you bind your new DataTable back to the DataGrid and it should reflect the changes. Hope your DataTable stored in Session does not have too much data (not more than 100 rows) in it.
You will probably have to call a SP to delete that row from database also.