Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Unbound checkbox doesn't maintain state across second postback
posted

Components at play:

SqlDataSource - uses a control parameter to filter results for display in the WebDataGrid

WebDataGrid - bound to the SqlDataSource and contains an unbound check box utilized by the user to selected any number of rows in the WebDataGrid

ASP.NET GridView - displays data generated from selected WebDataGrid rows after the first postback. This control does not allow the user to make edits and is only for informational purposes.

A button generates the first postback that examines the unbound check boxes in the WebDataGrid to determine which rows the user wants to generate additional data against. That data is generated and used as a datasource on the GridView control on the page, and the postback completes. Client side now displays the WebDataGrid with any number of rows checked, along with the GridView showing the additional info. If the user is agress with the GridView data, a second button is used to generate a postback to complete the operation. During that postback, all unbound checkboxes in the WebDataGrid have a value of false, even though the client side is displaying some as true.

How can I maintain the state of those unbound checkboxes across multiple postbacks?

  • 29417
    Offline posted

    Hello Eric,

     

    I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

  • 29417
    Offline posted

    Hello Eric, 

    Thank you for posting in our forum. 

    On which event are you retrieving the value of the cells from the UnboundCheckBoxField? 

    I’ve tested this on my side with version 14.1.20141.2011 which is the latest Service release of 14.1 and checked the values on a button’s server side click event, however I was not able to reproduce this issue.

    The values were properly set and were persisted on postback. 

    I have attached the sample I used to test this.  Please test it on your PC; whether or not it works correctly may help indicate the nature of this problem. 

    If the sample does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. 

    If the sample does show the product feature working correctly, this indicates a possible problem in the code of your application.  It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.

     Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.

     Please let me know if I can provide any further assistance.

      

    Best Regards,

    Maya Kirova

    Developer Support Engineer II

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

    wdg_UnboundCheckbox.zip