AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 rowupdating event not firiing
Posted by priya binu on  7/27/2007 10:56:49 PM Category: ADO.NET
Add to my favorites
Email to friend
hi,
Row updating event not firing at all, when mt gridview contains both bound and template fields and so my Update gridview is not happening ..any clues why its not firing

thanx in adavnce
Check Your GridView OnRowUpdating Event
Posted By Moderator1 on 7/26/2007 8:06:55 AM

Description:
Hi,

Thanks for contacting us for your doubts.

Please make sure your method to Update the Row is properly assigned to the OnRowUpdating Event of the GridView control.

Go to the HTML view of your GridView source code and check for the following line.
OnRowUpdating="GridView1_RowUpdating".
Here GridView1_RowUpdating is the method name and it is assigned to the OnRowUpdating of the GridView control.

Thanks.


I got replu for my previous quetion like this . , but already i checked that method is there in .aspx page ...still its not firing ,if i remove template fields and autogenerate fields to true then its firing ..so tell me what to do as i wanted template field for editing dropdownlist
thanx again

Post Your Reply Post New Question

 Viewer's Reply
What is mt gridview?
Answered By Moderator1 on 7/29/2007 7:28:47 AM
Hi,

what do you mean by mt gridview.. is it Empty gridview control. that is GridView control with no records. if so RowUpdating event will not fire.. you have to try RowCommand to insert the new values from the gridview control to the database. RowUpdating event will fire only when Update command is execute from the gridivew control.

if this is not the answer you are looking for, please post your question in this same thread. no need to post as new question. so that other members can also follow and help you to solve your problem.

Thanks. If you still have problem please explain the problem in details in this same question..
 
Hello
Answered By arlene canlas on 9/3/2007 6:19:41 AM
Please check if you have the following:

protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
BindGrid();
}
 
Please try this and let me know
Answered By subathra on 9/1/2009 4:08:33 AM
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
// Move all your initialization code here
initGridWithValues(true, -1);
}
else
{
}
}

Now you should be able to access Row_Updating event and cancellingEdit event. Let me know if this works.
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition - Free 207 Page Preview!
Simply SQL - Free 111 Page Preview!
Sexy Web Design - Free 71 Page Preview!