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
735
WinGrid databinding problem
posted
I have DataSet with 2 tables (Table A & B) and a parent-child relationship relating these two tables. First time i set the datasource of the grid to Table A, then the grid will show two bands, with Band 0 showing data in Table A and Band1 showing data in Table B. The problem happens when i try to restructure table B, reset the relationship of A-B and reset the grid's datasource to Table A. It still has two bands. But the Band 1 doesn't have any columns. I noticed that Band 0 is linked to Table A and Band 1 is linked to the relationship name. What is the correct way to reset the data source of the grid with the datatables containing new data schema. Thanks. Zongwen
Parents
  • 469350
    Verified Answer
    Offline posted

    What exactly are you doing to the DataSet? It sounds to me like either:

    A) The grid is still holding on to it's old layout. In which case, you should be able to get around this by calling grid.Layout.Reset. 

    B) Something is wrong with the data source and it doesn't actually have any columns in the child band. But since you didn't say what you are doing, it's hard to tell if this is the case. 

Reply Children