Databound control value issue

3 posts, 1 answers
  1. David A.
    David A. avatar
    126 posts
    Member since:
    Aug 2008

    Posted 26 Mar 2011 Link to this post

    Hi,

    I have a pageview with several tabs that have databound controls (textboxes).  When the user closes the form, I am validating these textbox values.  The problem is if a tab is not selected the textboxes are showing an empty text value (not the databound value) in code (validation fails).  As soon as I select the tab on the form the textboxes are populated and the validation succeeds.  Is there a way to "force" the textboxes in unselected tabs to populate their underlying values?

    Thanks!
  2. Answer
    Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 26 Mar 2011 Link to this post

    Hello David,

    The problem is not just that the textboxes do not hold the right value, the problem is that the handles for the page are created just when you first select a page, so before you select that page nothing will be created (initialized) for that page.

    So if you really would like to force this, then i would suggest on page load to select each page. It should work like this.

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga

    Telerik WinForms MVP
  3. UI for WinForms is Visual Studio 2017 Ready
  4. David A.
    David A. avatar
    126 posts
    Member since:
    Aug 2008

    Posted 27 Mar 2011 Link to this post

    Thank you.  That sounds like it is a great performance benefit.
Back to Top