This is a migrated thread and some comments may be shown as answers.

DataGrid Row Heights

6 Answers 349 Views
DataGrid
This is a migrated thread and some comments may be shown as answers.
Jeffrey
Top achievements
Rank 1
Jeffrey asked on 24 Sep 2019, 03:47 PM

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

6 Answers, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 25 Sep 2019, 01:44 PM

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
0
Jeffrey
Top achievements
Rank 1
answered on 26 Sep 2019, 07:25 PM

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

0
Didi
Telerik team
answered on 27 Sep 2019, 08:39 AM

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
0
Jeffrey
Top achievements
Rank 1
answered on 30 Sep 2019, 02:57 PM
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.
0
Yana
Telerik team
answered on 02 Oct 2019, 01:15 PM

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
0
Jeffrey
Top achievements
Rank 1
answered on 04 Oct 2019, 09:25 PM
Sorry it took so long to get back to you. That helped a ton. Thanks a lot!
Tags
DataGrid
Asked by
Jeffrey
Top achievements
Rank 1
Answers by
Didi
Telerik team
Jeffrey
Top achievements
Rank 1
Yana
Telerik team
Share this question
or