Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
How to delete some row of gridview without delete in database. For example, My tabel has IsDeleted field and in this field if this field is 1 then it deleted in gridview.........

Thanks
Shashank
Posted

 
Share this answer
 
If I correctly understood your question, then its very simple, you can fill the dataset with following query:

SQL
select * from tablename where IsDeleted!=1;


and use this dataset for gridview.

hope it helps :)
 
Share this answer
 
First you need to add an extra field as flag and its data type as int and set its default value as 0.
Now populate data in gridview with condition where falg=0 and on delete command of gridview update value of flag as 1.

By this no data will be deleted but it will show as deleted in Gridview.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900