data grid ..edit n update !!
-
hi , I have created a data grid and also connected to database ( in sql server) . my data grid table consists of few rows and columns . my each row shud be updated by modfying the row creating a edit box there in the page displayed when u click the edit button!! i want to edit each row and then update existing record of the table .. i am working in VS 2005 and using sql server manager for my database .. can somebody explain me each step clearly how to do this !!! thank you
-
hi , I have created a data grid and also connected to database ( in sql server) . my data grid table consists of few rows and columns . my each row shud be updated by modfying the row creating a edit box there in the page displayed when u click the edit button!! i want to edit each row and then update existing record of the table .. i am working in VS 2005 and using sql server manager for my database .. can somebody explain me each step clearly how to do this !!! thank you
1. Convert all bounded columns to the template columns. 2. Add a Link and set the commandname "Edit" in normal template.. 3. Add another link in edit template and set the commandname "update" 4. In Datagrid_ItemCommand event,
if(commandname = "edit"){ //change the datagrid to edit mode } else if(commandname = "update"){ // find the control and get the value // update this value to database... }
That's all..Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
-
1. Convert all bounded columns to the template columns. 2. Add a Link and set the commandname "Edit" in normal template.. 3. Add another link in edit template and set the commandname "update" 4. In Datagrid_ItemCommand event,
if(commandname = "edit"){ //change the datagrid to edit mode } else if(commandname = "update"){ // find the control and get the value // update this value to database... }
That's all..Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)
-
Those steps that I mentioned are the details.. I currently don't have the sample code for this..
Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net) "Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."