Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 07, 2012 04:06 PM by JerSmith2
Aug 04, 2008 08:46 AM|LINK
How to remove a row from gridview and not from database
Like i have one gridview and one remove button associated with each row..
now when i click on any row remove button then that row will be removed n shown in gridview but that value will be present in that database...
How to do???
Aug 04, 2008 02:32 PM|LINK
Aug 04, 2008 03:32 PM|LINK
if you want to delete perticular row in the gridview..
just Gridview1.Rows[ "rownumber"] .visible = false;
you need to deltee at run time?
Let me know
Aug 04, 2008 05:07 PM|LINK
basically in my application i want user to remove the any row from gridview and manipulate the rows available in gridview....but the row removed from gridview should not be deleted from database....
Aug 04, 2008 05:11 PM|LINK
As per I know if you bind the data gridview if your trying to remove the row from Gridview it will not remove from the database..
if will remove only from the gridview..
other wise you can false visibility of that row..
let me know if you have any questions..
Aug 04, 2008 05:28 PM|LINK
Aug 04, 2008 05:42 PM|LINK
Yes the data will not removed from the database until and unless you are explicetly calling the databsase function to delete them from the database.
Aug 04, 2008 05:46 PM|LINK
So could you plz tell me how to do.???i am giving a link button in template which i call as "Remove"
Aug 04, 2008 05:56 PM|LINK
Yes you can put link button.. if you clikc that buttong it should ask permision that you need to remove the row from the data grid
allow me few min I will send you code I am busy now little bit I will send you as soon as I can..
Aug 04, 2008 06:06 PM|LINK
place a Remove button in the itemtemplet so that you can see for each row that button link in the gridview..
you can remove the row from gridview
the code for this is..
gv1.DataSource = createDataSet(dt1);
let me know if you have any question or if you not understand anything in this.