Gridview not updating on postback

In fact, as we saw starting with the Overview of Inserting, Updating, and Deleting Data tutorial, editing and deleting is so common that the Grid View, Details View, and Form View controls can support such functionality without the need for writing a single line of code.In addition to Edit and Delete buttons, the Grid View, Details View, and Form View controls can also include Buttons, Link Buttons, or Image Buttons that, when clicked, perform some custom server-side logic.The only other time you'll need to call the bind method is when you change the data.I'd also advise staying clear of the update/delete events of the gridview too. I also had to make sure I update certain page elements in several other events after moving the Data Bind call into the ! A three tier approach would've been overkill for this page but yes it is a more robust design.

gridview not updating on postback-16gridview not updating on postback-42

This in turn means any customizations to the data (e.g. To avoid that problem, wrap the call to Data Bind in a check for Posat Back. Hope this helps, Imar --------------------------------------- Imar Spaanjaars Then bind to the collection using the pageload event and when page.ispostback = false.I have a very simple application that works almost all the time. My script manager is configured to enable partial rendering. Now, I had two users side by side running the application today. The first user did not get updates; her grid did not update. The only difference was that the first user was logged in for a long period of time. I reviewed the IIS log file and both users were polling the page every 3 seconds for the same data.My Update Panel is configured for conditional update mode. So why didn't the first user's grid update? Add a javascript function which will be invoked from the dropdownlist control, in this case this function is assigned to the Command property of the dropdownlist in code behind: the function Translate shown above performs the call and get the results in the specified page (in this case "Get Login Translations.aspx") when the request is completed and the request.onreadystatechange is set to the function Translate Labels this function will be executed.on this way the postback is not executed as before in the event on Selected Index Changed of the dropdownlist control.

Leave a Reply