i have one gridview contains edititemtemplate(which
contains update and cancel buttons) and i have one item
template (contains edit button)
i want the code for update and cancelbuttons in edit item
template and i want the code for edit button in
itemtemplate. please help me

Answer Posted / vishwaraj malik

write the following code

protected void GVAdvrtDetail_RowEditing(object sender,
GridViewEditEventArgs e)
{
GVAdvrtDetail.EditIndex = e.NewEditIndex;

}
protected void GVAdvrtDetail_RowCancelingEdit(object
sender, GridViewCancelEditEventArgs e)
{
GVAdvrtDetail.EditIndex = -1;
}

protected void GVAdvrtDetail_RowUpdating(object sender,
GridViewUpdateEventArgs e)
{

}


use findcontrol to update the recoed..

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How asynchronous call can be implemented using delegates?

533


How does a content page different from a master page?

570


Write code to send e-mail from an asp.net application?

541


In the Repeater control which way you can edit?

639


What are the file extensions for razor views?

665






What are the page life cycle events?

484


List some of the important session state modes of asp.net.

496


How to bind all the binding controls in a page at once in ASP.NET?

519


How many types of validation are there?

514


Explain transparent caching with aop?

514


I am trying to implement sorting facility from client side code in GridView Control. So how can I fill up an Array inside client side code (using JavaScript), i want to assign my DataSet object declared and filled up on Server side(in code behind) to the array (on client side)

1483


What is session in http request?

545


What is the difference between web config and machine config files?

545


Explain what is an assembly?

548


Is asp.net web forms dead?

504