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
45
Set the Wingrid row height to accomodate the size of the row content
posted

Hi,

I would like to setup the rows of my grid to match the size of the content.
Could you advise about the proper way to do it?

I tried in the InitializeLayout event to do:
e.Layout.Override.CellMultiLine = DefaultableBoolean.True
e.Layout.Override.Override.RowSizing = RowSizing.AutoFixed

I'm replacing a text editor that did contain history (a date and what occured at this date) by a grid containing a row per history item (date column + content column).
I would like to see all the content of the cells in edit/view mode without scrolling inside the cell (but of course, user will need to scroll inside the grid). 
I would need little height for empty rows.

Regards,

Gilles

  • 469350
    Offline posted

    Hi Gilles,

    There's no easy way to do this. You could try to work it out by getting the Height of a row and mulitplying it by the number of rows. But you will need to acccount for the column headers, horizontal scrollbar, borders, and the potential overlapping of the rows.