EDIT: I found a piece of code in the comments of this blog: I'm not sure for I haven't tried but the statement says you need to use the Data Source ID property in binding with the Grid View.

I might try that and see if you can assign an ID to a datasource and bind it in code behind.

If not I'll try the suggestion below =) I was doing databinding in my Page_Load event and when I clicked "Update" the Post Back was done, so was the Page_Load event fired.

asp net gridview rowupdating newvalues-69asp net gridview rowupdating newvalues-52asp net gridview rowupdating newvalues-85

Also, if convenient, would you post some detailed code snippet of your page and the code behind on this? All the parameters are actually associated to the Parameters declared in Data Source control (the select and update statement in Data Source control), also we can find some parameter name related attribute such as Old Values Parameter Format String="original_" So when we do not using Data Source control, there is no info for populating named parameters .... Also, I think it'll still require us to use Data Source Control when we need to Updating event to contains Parameters collection, however, it may become more user friendly if there're some additional functions on the Data Bound control which can help extract bound values from each row /column... ha AJ9Znc P8Ei3q L2 n GKN1K6B5U57An5w PDTl Bf TR hgoc D5IBPrxek8Ok Q6ARdran47 nw== | X-Complaints-To: ab***@| X-DMCA-Notifications: X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers | X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly | X-Postfilter: 1.3.32 | Path: TK2MSFTNGXA02gbl!

Regards, Steven Cheng Microsoft Online Support Get Secure! Thus, we may have to use the original means that extract the value from Grid View Row's Cell control collection like what we done in 1.1 with datagrid...

I just selected the Auto Generated Edit Button and Auto Generated Delete Button properties to True in the properties tab for the grid. Took 15 minutes to change it, my code is half if not less than it was before, and all I worked hard for now just works straight forward.

I have Enable View State set to true as well, but I am getting both e.

The database table used here has just two fields (sid and sname) My code is as follows: Web Page: --------------------------------------------------------------------------------------------------- im having the same problem i think: in my case i have set binding for template fields; ive a grid with 2 types of field: - bound filed editable (no the tamplate) - bound readonly field (template field) ive set Eval for the template and it is readonly, i placed also Bind to make a test but still count is zero; also had a try changing the datasource, and sure i have set the key field for the grid. OK, so I solved my problem, but not straight forward.

I am having a similar problem, but I don't have any Edit Item Template items in my grid. I just changed my code to use an Object Data Source. e Hm Pdzx7M/ukn FZJOh FDb J5W5f40 9Wy C2Zr Yc AVcbq V8rb5BTKgyj724PJ7 ARmnb YG EQ== | X-Complaints-To: ab***@| X-DMCA-Notifications: X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers | X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly | X-Postfilter: 1.3.32 | Path: TK2MSFTNGXA02gbl! not-for-mail | Xref: TK2MSFTNGXA02gbl microsoft.public.dotnet.framework.aspnet:372406 | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet | | Steven, | | From the aspx file: | | Cell Padding="2" Cell Spacing="2" Allow Paging="True" | Empty Data Text="the cart is empty" On Page Index Changing="grid Cart_Page Index Changing" On Row Canceling Edit="grid Cart_Row Canceling Edit" | On Row Deleting="grid Cart_Row Deleting" On Row Editing="grid Cart_Row Editing" On Row Updating="grid Cart_Row Updating" Steven, Thanx for confirming the limitation. I don't recall seeing it emphasized in the documentation, and these kinds of | dependencies create annoying bugs.It gets into the "On Row Updating" event just fine, but there are no New Values or Old Values. Regarding on the Grid View control's Row Updating event problem, it is the expected behavior because when we do not associate Grid View(or other ASP.NET 2.0 databound control) with Data Source control, it won't automatically query and fill the parameters collection of the updating/deleting/... In such cases, we need to manually extract the field values from the Template control. In that case you can do it using the Extract Values From Cell method to make the New Values collection yourself.The Grid View is bound to a strongly-typed collection, derived from Collection Base, through the control's datasource property at runtime. The Grid View is bound to a strongly-typed collection, derived from Collection Base, through the | control's datasource property at runtime. I don't recall seeing it emphasized in the documentation, and these kinds of dependencies create annoying bugs.