I have a webtab with 3 tabs. A webdatatree in the first tab, a dropdownlist in the second tab that are preloaded. In the third tab I allow the user to change or add data that thfirst two controls have populated. After saving the data on the third tab I call the routines to reload the Tree and the dropdownlist. Each routine clears out the control and re binds. Stepping through the code it does go through each of the routines correctly but when i go to either of the first two tabs the controls were not updated with the new data. I do not want to do a postback on the webtab tab change (unless there is a way to do a conditional postback based on which tab I select).
Everything works ok if I have postbacks allowed on the WebTab and reload the controls as I click on the tab.
Is the WebTab not refreshing my controls or am doing something else wrong?
Thanks!
Hi jcom39201,
I am attaching a sample, where a WebDataGrid is placed in one tab and you can select rows by clicking buttons in another tab. Note that setting EnableAjax to true for the second tab will prevent the grid from updating when the buttons are clicked. Please take a look and let me know if this helps.
I do have the postback set to off, but when the user does a save function on tab3 I also run the code to reload controls (webdropdown and webdatatree) on tabs 1 and 2. However, the code does run but when I go to either tab1 or tab2 the dropdown and the tree have not been updated with the changes made from tab3.
The only way I have been able to get the updates to work is to set the postback flags to On and call the load routines on the tabclick event. But, I do not want to have the postback ON on the tabclick.
Make sense? For some reason I think the webtab is keeping the control from reloading even though the code behind is being run.
I am not sure I understand your issue. Could you please clarify your question? If you don't want a postback on tab change, I would suggest that you try setting the AutoPostBackFlags-SelectedIndexChanged property to 'Off'. If set to 'Async', changing active tab will initiate an asynchronous postback.
Please let me know if you have any other questions.