Hello
I am using the data grid component. I want to add some padding to the rows, to spread them out a bit, however need to make the rows larger. There is a row height input parameter on the component, however this does not seem to work for me?
Is there something I am missing?
Thanks
I eventually got this working using the extended CSS property. Thanks guys
Check if the css class is being overridden?
Swatantra Kumar wrote:
I can't see it anywhere in the css. Doesn't appear to be being overwritten
Did you set the Row Height on GridContainer's Parameter?
I think it is working on DataGrid ver2.1.1.
I set the ExtendedClass on GridColumn's Parameter, I can set the padding with CSS.
HI,
In the Datagrid, you need to add a CSS style as an extended CSS and override the CSS column height which uses the DataGrid row. I hope this will help you.
Thank you,
Sudip
Great! That's what Sudip suggested in his answer.
Thank You @Swatantra Kumar
Can you show me how?
Hello Neil,
I've attached a sample where we change the row height parameter and it changes the height of the row. Please let me know if this helps you.
Thanks! Got it. How about making it auto height? Would that be possible?
Hey Neil. Sorry about the delay.
You can set auto height by using autoRowHeights as true on Grid's AdvancedFormat property.
For it to work, you need to set the RowHeight to 0. Bear in mind, that if your grid has many rows/columns, the performance will decrease a lot. So it's not recommended in this use case.
I've attached a sample using autoRowHeights. But in my sample I have lots of rows, so the performance is not great.
Ps.: In the sample I set the second column to support multiLine property. To test it, edit the values and press alt + enter to create a new line.
In case you have any questions, feel free to ask us.
Gabriel Lundgren