When I click the Edit button the checkbox becomes active and is checked depending on whether the data has a 0 or a 1. New Values seems to work for other edittemplate fields ok. New Values["webname"] = "randomvalue"; I think I want to be able to do this... @masterpass - The Toggle method works fine in checking or unchecking the Edit Template checkbox. Maybe it will help: It's actually fairly easy to get the info you want once you know the trick. Data Bind(); To populate the New Values collection, put the following code in the Row Updating event: Grid View gv = (Grid View)sender; for (int i = 0; i Thanks 13598, I don't quite understand what you code is does but I found a work around myself. One is a hidden field that containes 0 or 1 depending on the data and the other is a checkbox that we can also set depending on 0 or 1.
The problem is when I click Update the value is always saved back to the database as a 0 (Because that is the database default when no value is supplied) Please help! But I still have the problem that when updating the Value from the checkbox does not seem to be getting through. I have checked my Update method associated with the Grid View and it seems to be fine. When dynamically binding to the Grid View, use the following code in the Row Editing event: Grid View gv = (Grid View)sender; gv. When the Update button is clicked the value of the checkbox is used to set the hidden field value that is send back to the database.
Alok Hi aloksinha83, Please see this post: Qin Dian Tang Microsoft Online Community Support Please remember to mark the replies as answers if they help and unmark them if they provide no help.... Regards Leif I'm talking with absolutely no knowledge, but why not to trigger "onblur" event in the client textbox and forward it to whatever the edit-and-update links go? Get value from gridview cell while in edit mode Hi, I'm attempting to get a value from a cell in the selected row, but it keeps telling me "Object Reference not set to an instance of an object". Code: Protected Sub ds BType_Data Binding(By Val sender As Object, By Val e As System. Gridview edit mode I have a gridview that has a bound dropdownlist inside its Edit Item Template.
Change Gridview cell in edit mode Hello, I am trying to replace a cell value in a Grid View (Edit Row) but unable to, I hope you can help me with thanks in advance. Is there really an easy way to click and edit a cell value at run time (without having to click on Edit and Update links) in Grid View? The value I'm trying to get is in a item template. How do I capture the event when the user selects a different item in the dropdown?
I already build the event to save the new record, time and user machine information to a log database.