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
340
row autosize based on single column
posted

I need to resize rows in a grid based on a single columns value.  The xRow.PerformAutoSize() method seems to be sizing rows based on the longest text in any column (even if not visible).  Is there a way to control this.

Example:

Column A has description

Column B has street address

I want to expand the row size to allow the entire Description to display on a row by row basis.  Rows where the Description is blank still resize with .performautosize because the street address does not fit in the cell.  I want to ignore the street address in this case.

Thanks in advance for any help or direction.

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    PerformAutoSize on the row changes the row's height based on all of the data in the columns for that row. So... just to be clear, you are concerned here with the height of the row, and not the width of the column. Is that right? I ask because it seems a bit odd - it would seem to make more sense to adjust the width of the description column. But maybe your app is different.

    Anyway, the only way I can think of to handle this would be to hide the description column (set column.Hidden = true) before you call PeformAutoSize on the row.

Children