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
200
Tree is not re-binding
posted

WinTree is bound to a DataSet that I am creating on the fly. At some  I am constructing a brand new instance of the DataSet (brand new DataTables, DataColumns and DataRows) and calling tree1.SetDataBinding(dataset, null) again.  If the structure of the DataTable within the DataSet is modified (columns are different), the structure of the dataset is not reflected on the screen - no matter what I do. However if the number of the DataColumns stays the same everything binds correctly.  I am using UltraWinTree 8.1.20081.1000 Is that a known defect? Thanks.

Please respond to andrebii at aol.com

 

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    Assuming you have AutoGenerateColumnSets set to true (which is the default), then the tree is probably not recognizing that the data source has changed, since you are assigning the same instance of the dataSet as it's data source.

    There are a number of ways you could handle this. One way would be to set the DataSource to null first, then back to your DataSet. You might need to clear the tree's existing ColumnSets while the DataSource is null.

    Another option would be to create a new DataSet, rather than re-using the same one and clearing and rebuilding it.

     

     

Children