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
115
Column width behaviour when binding from one table to another...
posted

I'm using the same ultragrid to allow users to edit row data for different tables.  So each time they select a table to edit I bind it to the same ultragrid.  This all works very well.  But, if going from one table to another, and the tables share columns with the same name, the size of those columns (the similar ones) get very wide and the distinct columns get forced very small.  Before I start using the grid I set its AutoFitStyle to ResizeAllColumns so my hope was that the columns would be evenly spaced each time I bind to a table.

Any thoughts on why this might be happening or is there a call I can make between binding from one table to another to 'reset' the columns so they are more evenly spaced... similar to when the grid was initially populated the first time?

I am using 12.1 Win.

Thanks!

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi,

    I'm not really sure I understand exactly what you mean. Can you post screen shots of what you are seeing?

    If you are re-binding the grid to a new data source that has exactly the same structure as the old data source, then the column widths shouldn't change. But it's possible that the grid is re-applying the adjustments for the AutoFitStyle each time.

    Whatever the issue is, you might be able to get around it by saving the layout before you change the DataSource, and then re-loading it afterward.

Children