Home Forums WinForms controls Xceed Grid for WinForms fixed row height

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15772 |

    how dow I fix the row hieghts so user cannot adjust? (vb.net)

    Imported from legacy forums. Posted by troy@querytool.com (had 2484 views)

    Xceed Support
    Member
    Post count: 5658

    You could easily implement it through the HeightChanged event:

    <code>
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
    ‘…

    AddHandler gridControl1.DataRowTemplate.HeightChanged, AddressOf DataRowTemplate_HeightChanged
    End Sub

    Private Sub DataRowTemplate_HeightChanged(ByVal sender As Object, ByVal e As EventArgs)
    DirectCast(sender, Xceed.Grid.DataRow).Height = 16 ‘or the original height
    End Sub
    </code>

    Imported from legacy forums. Posted by CharlesB (had 358 views)

    User (Old forums)
    Member
    Post count: 23064

    You could also set the MinHeight and MaxHeight properties instead of catching the event:
    <pre>gridControl1.DataRowTemplate.MinHeight = 16
    gridControl1.DataRowTemplate.MaxHeight = 16</pre>

    Imported from legacy forums. Posted by Tommy (had 3731 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.