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
955
How to add tabs to a WinTabStrip that is binded to a DataSet
posted

I am attempting  add a new  tabs to a WinTabStrip and the shared controls are binded to a an empty dataset for data entry. When I attempt to use the "Tabs.Add()" method the application bombs. If I do not bound the WinTabStrip and shared controls,  when the Tabs.Add() method is used the new tab controls will contain the data entered from the previous tab.  What I am asking is do I have to write the changes and add a new row to the dataset and re-bind the tabs and controls each time I want to add a new tab?  If so, does anyone have any exmples on how to do this?

Thanks for any help!  

 

 

Parents
No Data
Reply
  • 71886
    Suggested Answer
    Offline posted

    Hello CHPEmpl,

    I was able to reproduce your scenario. When the WinTabStrip control is bound to a dataset you could add new tabs by adding new rows in the DataSet DataTable which is the Data Member of the control. For every row added to the DataTable, a tab is being added to the control - this collection is read-only and this may be the reason why the application is throwing an exception. As a row is added, deleted or modified in the DataSource, the collection is being automatically updated and reflects the changes. When the tabs are beign loaded, TabDataInitialized event is fired on every tab.

    Please note, we are making efforts to ensure all posts are addressed by an Infragistics expert. We believe that the other community members could benefit from this thread as well.

    Please do not hesitate to contact us if you need any additional assistance.

Children
No Data