We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Change all rows height

To resize a row in GridDataBoundGrid I use gridModel.RowHeights.Item(rowindex)=myheight and that works for a single row. When I want to set the same height to all rows I use a For/Next cycle like this Dim i As Integer For i = 0 To gridModel.RowCount gridModel.RowHeights.Item(i) = 50 Next but the problem is when I insert a new row using the AddNew method because the new row height is not the same. How can I solve this problem?

1 Reply

AD Administrator Syncfusion Team August 27, 2004 12:14 PM UTC

Any new / inserted rows will use the this.gridControl1.DefaultRowHeight property. Also, any rows which have not had the RowHeights explicitly set will also use this property. So, if you want all/most of your rows to have the same height, you probably would be better off not looping through, and explicitly setting each grid.RowHeight[row] value, but instead just setting the default value, this.gridControl1.DefaultRowHeight.

Live Chat Icon For mobile
Up arrow icon