DataGrid Row Heights

7 posts, 0 answers
  1. Jeffrey
    Jeffrey avatar
    12 posts
    Member since:
    Aug 2012

    Posted 24 Sep 2019 Link to this post

    Is there a simple way to set the row height? I dropped the CellStyle FontSize lower, but the rows are too far apart. They seem to be double spaced.

    Thanks,

    Jeff

  2. Didi
    Admin
    Didi avatar
    384 posts

    Posted 25 Sep 2019 Link to this post

    Hello Jeffrey,

    I am afraid I cannot suggest another approach for achieving this requirement. We have a feature request logged in our Feedback portal:

    https://feedback.telerik.com/xamarin/1366210-datagrid-provide-an-easy-way-to-set-row-height 

    You can cast your vote for the item in order to affect its priority. 

    Let me know if I can assist with anything else.

    Regards,
    Didi
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Jeffrey
    Jeffrey avatar
    12 posts
    Member since:
    Aug 2012

    Posted 26 Sep 2019 Link to this post

    Thanks for the response, Didi. I added my vote to that feature request.
    So, there is no easy way to set the row height. Is there a hard way? If so, do you have an example?

    Thanks,

    Jeff

  4. Didi
    Admin
    Didi avatar
    384 posts

    Posted 27 Sep 2019 Link to this post

    Hi Jeff,

    Thank you for your vote on this feature request. 

    Currently, the solution I could suggest is applying a custom DataGridTextCellStyle to the CellContentStyle property for each column within your RadDataGrid:

    Example:

    <telerikDataGrid:DataGridTextColumn PropertyName="Country" >
           <telerikDataGrid:DataGridTextColumn.CellContentStyle>
                   <telerikDataGrid:DataGridTextCellStyle  FontSize="15"
                                                                                   SelectedTextColor="Orange"  />
    </telerikDataGrid:DataGridTextColumn.CellContentStyle>

    Regards,
    Didi
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Jeffrey
    Jeffrey avatar
    12 posts
    Member since:
    Aug 2012

    Posted 30 Sep 2019 Link to this post

    As I mentioned in my original question, I already changed the CellStyle FontSize and the row height is still too far apart. Are you saying that the row height is not adjustable? Seems like a pretty major limitation. All of your other grids like (Kendo, ASP.Net AJAX, etc.) have this feature.
  6. Yana
    Admin
    Yana avatar
    5044 posts

    Posted 02 Oct 2019 Link to this post

    Hi Jeffrey,

    I am sorry for the confusion.

    There is default TextMargin of the DataGridTextCellStyle which you need to override in order to reduce the overall row height of the columns:

    <telerikGrid:DataGridTextColumn.CellContentStyle>
        <telerikGrid:DataGridTextCellStyle TextColor="DarkOliveGreen"
                                        FontSize="10"
                                        TextMargin="2"
                                        VerticalTextAlignment="Center" 
                                        HorizontalTextAlignment="Center"
                                        SelectedTextColor="Brown">
        </telerikGrid:DataGridTextCellStyle>
    </telerikGrid:DataGridTextColumn.CellContentStyle>

    Please give this a try and let me know how it goes.

    Regards,
    Yana
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  7. Jeffrey
    Jeffrey avatar
    12 posts
    Member since:
    Aug 2012

    Posted 04 Oct 2019 in reply to Yana Link to this post

    Sorry it took so long to get back to you. That helped a ton. Thanks a lot!
Back to Top