Hello,
I have an UltraGrid which I display 5 rows in. When my 5 rows are bound, there is an useless space below the last row.
So here is my question, is there any Infragistics property to set, which enable me to quit this useless space ?
How can I ensure that all my rows are displayed inside the whole visible row-layout height ?
I've tried to do it dynamically dividing the sum of the row-layout height by the number of displayed row but a piece of the last row is hidden by the ultragrid's bottom border.
Any easier solution ?
Thanks for your answers.
Rivo
Hi Rivo,
There is no property to auto-height the rows. To display something other than the white space, we have the EmptyRowSettings under DisplayLayout which has an EmptyRowSettings.Style property. The values in the enum are:
It looks like this in code:
ultraGrid1.DisplayLayout.EmptyRowSettings.Style = Infragistics.Win.UltraWinGrid.EmptyRowStyle.ExtendFirstCell
We added this to accomodate for the use case you seem to be describing. Let me know if this helps, we can put a feature request in to auto-height the rows based on the grid height if that is what you are asking for, but that seems pretty edge case to me, unless I am misunderstanding what you are after.
Let me know any more details or if this helps,
Thanks
Jason
Hi,
What a pity if we cannot auto-height the rows. The solution you posted does not help me. It seems to work only for empty rows. But what I'm trying to do is to spread out all the rows on the whole row-layout height of my ultrawingrid. So the row-height will be automatically calculated based on the row-layout height. Each row will have the same row-height, and the useless space below the last row will be hidden.
It's like when you use Dock property or (Anchor) in any winform control : you can dock a button (for example) so that when using "Fill" enum-value the height will be automatically initialized and computed when you resize your form. And this is done and managed by the computer itself.
It'll be very cool if a property (such as Anchor) exists and enable us to auto-height the row-layout.
Finally, if we cannot use any infragistics' properties, so I think I'd rather calculate the height of each row like this :
height of each row = (ultrawingrid_height - ultrawingrid_header_height) / number_of_rows.
Thank you very much !
Rivo (from France)
PS :
I'm asking myself a question : Is the grid drawn (or painted) above or inside the ultrawingrid-layout ?