c# - Listview not fully updating on databind() after postback -


I have a ListView control that is displaying a strange behavior - lines only partially updated after a postback I am expecting someone to be here, but some light can be highlighted.

My Listuar Datasource is linked to the list of items that are stored in the session session, knowingly, since partly to see partial out-of-date from time to time, many Users see the data. On plain resort operations, the sorting page is handled via javascript, and the list / session data order is kept in sync through callback. Callback also checks for permission levels on a particular resort operation which is more complex, creates a postback on the page to handle JavaScript sorting logic on the page. The list / session is updated as a callback, then the list view is retrieved for the control data. The page loads again, and the rows show new orders, there is no problem, okay?

The problem is that the some of the elements in the list does not change the value according to the new order. While processed hyperlinks and text on the page (such as & lt;% # Eval ("ProjectAbbrev"%>) are updated appropriately, check boxes, liters, and dropdowns on which their values ​​are set through the on-the-end datebound event method They remain "stable" in place, even if taking action through code shows that the method runs during postback, and this control should be set to their new values. If I go to go and manually notice If I shorten it, then half the original size, to ensure that only those things are changed again, but the checkboxes and they also maintain their original values.

So my question is : Are updating these elements with the remaining list view control elements on postback? I realize that I am misinterpreting Page Lifestyle in ASP.NET or I have a bug of some kind.

< P> I'm thinking this time I need to move more complex JavaScript sorting on the page, but it would be difficult and I would probably like to avoid doing this
Update: I have tried to set EnableViewState incorrectly and it has to I can not use that strategy in any case because the second part of the page (saved) depends on reading the viewstate at the end.
Update: I'm providing some code snippets in hopes that they will put some light on this issue:

Page: Hyperlink element will be updated properly after postback, but the checkbox that it has The value specified in the OnQueueRepeater_ItemDataBound method, will remain the same.

  & lt;% @ Control language = "C #" AutoEventWireup = "true" CodeBehind = "Textprocessor projects. Capsules" inheritives = "ETD.UI.Controls.TextProcessorProjects"% & Gt; & Lt; ASP: LISTviewview ID = "Qualcomm Vive" runat = "server" on ITEMDATAND = "ONQUAVERPETER_ITATA DATA BAND" & gt; & Lt; ItemTemplate & gt; & Lt; TR & gt; & Lt; Td> & Lt; ASP: Hyperlink Runat = "Server" ID = "Project ID Link" & gt; & Lt;% # Eval ("Project Ebrevil")% & gt; & Lt; / Asp: hyperlink & gt; & Lt; / Td> & Lt; Td> & Lt; ASP: checkbox runat = "server" id = "scan checkbox" limit = "none" /> & Lt; / Td> & Lt; / TR & gt; & Lt; / ItemTemplate & gt; & Lt; / ASP: ListView & gt;  

Back code: On postback, the following code is executed:

  protected list & lt; Book & gt; Get the session ["line"] ({return (list & lt; book & gt;) session ["line"];} set {session ["line"] = value;}} and if (Espublack & amp; page! IS callback) / Resume Quaiditem List Properly RescueQue (Requests Parations) // Rebinding qiilistview.DataSource = Quadocumentaries; QueueListView.DataBind ();} Protected Zero OnQueueRepeater_ItemDataBound (Object Sender, ListViewItemEventArgs e) {// ... // ... Other control checkbox scan checkbox = e. Fund Control (check box "Scanned Checkbox"); Scanned Check Book. Check = Book.}  

Update: I have left it to work and Javascript I have transferred my sorting logic to the client side. If someone has an idea why this strange behavior is happening, then I am very interested in hearing them! ">

Out of interest Which bits on page The pain you are Databesing? Page_Load?

Try it on OnPreRender - can help.


Comments