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
1640
mergedcell autosize issue
posted

Hi,

I have a problem with the mergedcell. Like in the image, 'Column 0' is a multiline column with the MergedCellStyle property set to always. And the Row Sizing feature is set to AutoFree. When data is loaded, both rows of 'Column 0' are auto resized large since they have the same big text. Is it possible to let the merged cell share the same height like the following? And by the way, how the cell a and c, b and d could share the average height, which is half the big 'Column 0' cell's height?

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi,

    I tried this out and I get the same results, but I don't know if there's any good way for the grid to handle a situation like this. Since the row heights are variable, there's really not way to grid could know how much height to apply to each row when cells are merged between two (or more) rows.

    I guess this could be done as a sort've 2-pass process, where the grid determines the height of every row and ignores the merged cells, and then makes a second pass to make sure each Merged cell is big enough to display all of the text, but this would be pretty inefficient and might cause performance problems.

    Another option here would be for us to add a property that allows you to simply ignore merged cells when dealing with autosizing of the row heights. In theory, since the merged cells will always be at least 2 rows high, anyway, this will probably work most of the time.

    But any way you look at it, this could potentially cause either performance issues or sizing issues.

    Also, I suppose this doesn't come up all that often, as I expect that most of the time, merging is done on cells with smaller values, since the longer the value is, the less likely it is to be exactly the same as an adjacent cell.

    Do you think adding a property to ignore merged cells when autosizing the rows would work in your application? Or is the merged cell text much larger than any other cell in the row.

Reply Children