SfDataGrid QueryRowHeight based on content + converter gets wrong height

Good morning syncfusion team,

in my datagrid I want to set the height of each row based on its contents. I used this example: https://www.syncfusion.com/kb/7446/how-to-adjust-row-heights-of-each-row-based-on-their-content

In the grid is a textColumn that gets its value from a converter (keyvalue collection -> separated string). Even if the value is empty, the place for the collection typename is reserved (Screenshot_RowHeightValues). 
    

<sfgrid:GridTextColumn HeaderText="Mitarbeiter" CellTextSize="13" HeaderCellTextSize="14" MappingName="Mitarbeiter" TextAlignment="Start" DisplayBinding="{Binding Mitarbeiter, Converter={StaticResource CollectionToStringConverter}}" Width="150" />

If I remove the "DisplayBinding" section, you can see the height is exactly like the typename from collection (Screenshot_RowHeightNoConverter).


Can you look after it?
Thank you!

Regards,
Maria

Attachment: Screenshot_RowHeight_99df4e45.zip

3 Replies

KK Karthikraja Kalaimani Syncfusion Team June 17, 2020 10:41 AM UTC

Hi Maria,

We have checked the reported issue “Wrong height applied when use DisplayBinding for GridTextColumns” in simple sample. We saw that the height calculated from MappingName instead of property from DisplayBinding. So, only the height calculated and assigned for all the rows based on the value from mappingname even when the value of DisplayBinding is empty. Please let us know for what purpose you are using DisplayBinding. So, that we can provide the exact solution for your requirement.

Regards,
Karthik Raja 



AN Andy June 17, 2020 11:18 AM UTC

Hi,

I use DisplayBinding to show the value in this case because there I can put my converter in. As far as I know you can't combine the MappingName value with a converter? I use the converter to show the items in list<keyvalue> as a comma separated string.

Thanks for your quick answer.

Greetings 
Maria


KK Karthikraja Kalaimani Syncfusion Team June 18, 2020 02:21 PM UTC

Hi Maria,

Thanks for the update.

We have analyzed your requirement “Wrong Height returns while calculating AutoRowHeight” in our source. We considered Auto Row height calculation based on MappingName properties and not from DisplayBinding Properties and that’s the behavior of SfDataGrid. So, only the Height is calculated from MappingName text. We have considered to implement this support “Consider Auto Row height calculation based on DisplayBinding Properties” and logged feature request for the same. We will implement this feature in any of our upcoming release.    
   
At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We will let you know when this feature is implemented. We appreciate your patience until then.  

You can also communicate with us regarding the open features any time using our Feature Report page.   
 
FeedBack link : https://www.syncfusion.com/feedback/15370/consider-the-autorowheight-calculation-for-displaybinding-text-in-gridcolumns


If you have any more specification/suggestions to the feature request, you can add it as a comment in the portal and cast your vote to make it count.  
 
Regards,
Karthik Raja 


Loader.
Up arrow icon