Ticket T233080
Visible to All Users

DataGrid - How to set row height?

created 10 years ago

Hi,

I'm new to DevExtreme but it looks like the DataGrid control adjusts all the row heights to be equally stretched along the control's height. How would I set a fixed height to all rows? Can I set height separately for any row by index? I know it should be an easy task, but wasn't obvious from my brief search of the supporting docs.

Thanks.

Answers approved by DevExpress Support

created 10 years ago (modified 2 years ago)

Hi Nikita,

Set the row height in the dxDataGrid.onRowPrepared event handler as shown below:

JavaScript
onRowPrepared(e) { if (e.rowIndex % 2 === 0) e.rowElement.css({ height: 50}); }
    Show previous comments (4)
    DevExpress Support Team 5 years ago

      Hello,

      I've created a separate ticket on your behalf (T879889). It has been placed in our processing queue and will be answered shortly.

        Is there a good CSS override for this? Seems like using onRowPrepared is a resource hog? It has to loop through every row just to place a height?

        DevExpress Support Team 4 years ago

          Hello,

          I created a separate ticket on your behalf: (T981017: DataGrid - How to set height of each rows?). We placed it in our processing queue and will process it shortly.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.