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
705
Want to copy the columns width from one grid to another at runtime.
posted

I'm assigning the dataset of one grid with a button.  After that assignment I want the column size of another grid to mimic the grid I just assigned the dataset to.  However I couldnt find an event thats will run after the new dataset gets loaded the UI changeds for the new grid.  The code I'm using is simple I just cant get it to run after the UI is updated.

 

for (int ii = 0; ii < ultraGridHeaders.DisplayLayout.Bands[0].Columns.Count; ii++)

{
 ultraGridHeaders.DisplayLayout.Bands[0].Columns[ii].Width = ultraGrid1.DisplayLayout.Bands[0].Columns[ii].Width;
}

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    I don't think you need an event. Can't you just call this code immediately after setting the grid's DataSource.

Children