With this Grid View control, you could display an entire collection of data, easily add sorting and paging, and perform inline editing.In addition to just displaying data, the Grid View can be used to edit and delete the displayed data as well.From the following chapters you can see some important operations in ASP. Save all or press "Ctrl S" and hit "F5" to run the page, the page will look as in the following image: Click on "Edit the Grid View", it will display Textboxes in each cell as in the following image: Edit the value(s) here and click on the Update link, it will update all the data or to remove it click on the "Delete" link above the image shown.It doesn't look like its possible to retrieve new values if there is a gridview without datasource. Please remember to use [code] tags when you post code. I just need the data, and I'll then run a stored procedure to update the values, THEN re-query it. The Confirm and Scrap commands all work fine, as do my refresh and display routines. -Frinny I had exactly the same problem and finally with my colleague's help we found the mistake.Can someone please translate this for me from C# to VB. 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.aspdotnet-suresh offers C#articles and tutorials,csharp dot net,articles and tutorials, VB.
Text); Unfortunately, it looks like I'm getting the value prior to the edit. Let's say the column value is 15 before I click the update button. To String() also, but that might have got me a blank string instead. If you find a solution, or if the above helps, please let me know. The only thing I'm doing differently (I think) is that I'm creating my grid dynamically. ~Haleigh I'm having the same issue that the original poster is having, but this trick isn't working for me. "test" will appear in label not "asd" as I would want to. When I click edit on the grid and change the value of the textbox and click update the label will just display the original value of the textbox. "When I click edit on the grid and change the value of the textbox and click update the label will just display the original value of the textbox." So lets say there is "test" in the textbox originally and then I edit it to "asd" then click update.I have the following code below in my Grid View1_Row Updating event. Maybe after midnight today, or sometime this weekend. When I go to configure the datasource for my Object Data Source, on my first screen where I designate the business object, my dropdownlist is blank. Turns out getting the DAL, BLL, and the Object Data Souce in place, did the trick. Tracing the code, using both methods above, the value of the textbox is not being passed back; it doesn't appear in the newvalues either. That probably needs to be linked into the Object Data Source along my Get Products, as well as the Add Products, and Delete Product methods. Problem is, I don't have the time at the moment yet. And back to my original question, how to I get the new value? I have a gridview, go into edit mode, enter a value in a textbox, then click update. Is this a limitation of creating the grid dynamically? I'm having the same issue that the original poster is having, but this trick isn't working for me. I've tried every method I can find to get the new value for a control, and it's continually coming back as the old method.I can't get this to work and I was hoping this would solve my problem trying to update a gridview without datasource. Grid View was filled with the old values again, so in my Grid. Is this a limitation of creating the grid dynamically? When you are explaining your problem please post any code snippets that will help us understand what you are doing. None of them will retrieve anything but the old data. I just need the data, and I'll then run a stored procedure to update the values, THEN re-query it. The Confirm and Scrap commands all work fine, as do my refresh and display routines. In the future just post the portion of your code that's causing problems. When you do this your data is bound to your grid view and your newly entered information is lost...it's quite a common occurrence to Grid View update problems.