Current filter:
                                You should refresh the page.
                                  • Hello.
                                    I have a XtraForm with TabPageControl on it. Every Page has it's own Layout Control and some controls on it.
                                    I have implemented my custom validation for controls. Everything works fine except when I close form without any click except OK button(on OK i perform validation on every edit control), every control on TabPages not showed already, report me that they are null - but my form was already populated with data.
                                    After code trace, I have found that controls on not showed TabPages have theirs EditValues set to null. If I use (click) tab page with that controls, before full form validation, they get data and validation passes good.
                                    What I should do to have all controls get their bound data immediately after form construction?

                                1 Solution

                                Creation Date Importance Sort by

                                Hello Janusz,
                                Please review our answer to a similar question in the Support Center:
                                Is there a way to turn off lazy loading in the XtraTabControl?
                                Thanks,
                                Nick
                                --------------------
                                Check if Search Engine is able to answer questions faster than I do!

                                • (no info) 03.28.2019

                                  Something is clarified in article that You linked me to. But question still stands:
                                  How to force XtraTabPage to load all Edit Values at form Loading?

                                • Nick (DevExpress Support) 05.17.2010

                                  Hello Janusz,
                                  To force data binding at the form load stage, iterate through tab pages and activate them. I'm sending you a sample project.
                                  Thanks,
                                  Nick
                                  --------------------
                                  Check if Search Engine is able to answer questions faster than I do!

                                • (no info) 03.28.2019

                                  Thanks for help. Problem solved.

                                • Yuntian Zhang 08.16.2019

                                  We found that changing SelectedTabPageIndex doesn't work at all. Below is a version that does work:

                                  [C#]
                                  protected XtraTabControl FixDataBinding { get; set; } private void EditFormUserControl_VisibleChanged(object sender, EventArgs e) { if (FixDataBinding != null) { // https://www.devexpress.com/Support/Center/Question/Details/Q259067/edit-value-not-loaded-until-component-tab-page-is-visible // bind data on invisible tabs var initialTab = FixDataBinding.SelectedTabPage; foreach (XtraTabPage t in FixDataBinding.TabPages) { t.Show(); } initialTab.Show(); } }

                                  Subclasses will assign their tab control to FixDataBinding in their constructor.

                                • Sasha (DevExpress Support) 08.19.2019

                                  Hello Yuntian,

                                  To process your recent post in the most efficient manner, I've created a separate ticket on your behalf: XtraTabControl - Setting the SelectedTabPageIndex property doesn't change an active tab. I will address it shortly.