Help on grid view row command

Posted by Vijayar under C# on 7/21/2011 | Points: 10 | Views : 3213 | Status : [Member] | Replies : 5
Hi
i have a grid with 3 options i.e. edit ,delete and view
how to write the code for 3 commands in grid view
.is it possible to write with in row-command for this
gridview-rowcommand()\
(
if (
e.commandname==edit)
{}
else if(e.commandname==view)
{
}
else if(e.commandname==delete)
{
}
}
is it correct or wrong,whether i should generate row deleting handler for deletion
tell me

vijaya


Responses

Posted by: Poster on: 7/21/2011 [Member] Starter | Points: 25

Up
0
Down
Read this article http://www.dotnetfunda.com/articles/article29.aspx that shows how to update and delete records. If you are interested in using jQuery, read this http://www.dotnetfunda.com/articles/article924-add-edit-delete-paging-records-in-gridview-using-jquery-.aspx.

Thanks

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vijayar on: 7/21/2011 [Member] Starter | Points: 25

Up
0
Down
Hi
i need 3 of them to appear as a Imagebuttons in gridview

vijaya

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jpchoudhari on: 7/21/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Vijayar,

use template columns and ImageButtons for that.

Kind Regards,
Jay

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sweetyuva on: 7/27/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,
Its correct only. you have to call gridview row deleting event for deleting and row editing event for edit . Simply call the events. No need of writing any codes.



Regards,
Yuvaraj.

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vforvijay on: 7/27/2011 [Member] Starter | Points: 25

Up
0
Down
hi..You can try this link........
http://www.dotnetcode.in/Howtoeditgridviewbydelete%2CupdateusingASP.net

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response