Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to change the Grid's height according to the total height of its rows

$
0
0

The size of each GridView's element is calculated by the GridViewInfo class. The instance of the GridViewInfo class, containing information about a specific GridView instance, can be obtained via the GridView.GetViewInfo method. This method is hidden for IntelliSence, but is public and can be called from external code.

Question Comments

Added By: Gerard Chartier at: 6/16/2014 4:40:32 AM    

I am having problems with this approach. When I set gridControl1.Size to the newly calculated value, it has no effect. Is there a property of the GridControl that could prevent it from being resized? My GridControl is within a LayoutControl, along with a number of LayoutControlItems and their controls. I am using version 13.2.9.

Added By: Uriah (DevExpress Support) at: 6/16/2014 5:29:40 AM    Hello Gerard,

I have created a new ticket on your behalf and passed it to our team for research: Setting the GridControl.Size property to a value has no effect if the GridControl is inside the LaoutControl  Please bear with us. We will get back to you as soon as possible.Added By: Jerther at: 12/10/2015 6:57:31 AM    

Is this still the best and only way, now with 15.1?

Added By: Uriah (DevExpress Support) at: 12/11/2015 5:31:57 AM    Hello Jerther,

Yes, this is the best way. We have not yet added another method or property that can be used for the same purpose.Added By: Justin Tysco at: 9/1/2016 2:38:23 PM    CalcRealViewHeight does not seem to calculate the height correctly if I assign a memo edit to one of the columns and have word wrapping & auto height enabled (causing some rows to be taller than others).


Is there any way to calculate the correct height for such a scenario?
Added By: Nadezhda (DevExpress Support) at: 9/1/2016 11:17:14 PM    

Hello,

I've created a separate ticket on your behalf (How to change the GridControl height based on the height of all rows when MemoEdit is used). It has been placed in our processing queue and will be answered shortly.


Viewing all articles
Browse latest Browse all 7205

Trending Articles