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

Displaying Multiline Header in Winform DataGrid

Is there any way of displaying multiline header in Winform Datagrid I tried adding newline character in HeaderText of DataGridTextBoxColumn, set the Multiline property to true but nothing seems to work. --Thanks Mahesh

1 Reply

AD Administrator Syncfusion Team August 31, 2004 06:04 PM UTC

Using vbcrlf & increasing datagrid HeaderFont property, v can achive this. find below ex Dim dgCol As DataGridTextBoxColumn dgCol = New DataGridTextBoxColumn dgCol.MappingName = "Id_Emp" dgCol.HeaderText = "Employee" & vbCrLf & "Id" dgCol.Width = 45 dgsTblStyle.GridColumnStyles.Add(dgCol) and set datagrid HeaderFont property as Arial 25 > >Is there any way of displaying multiline header in Winform Datagrid I tried adding newline character in HeaderText of DataGridTextBoxColumn, set the Multiline property to true but nothing seems to work. > >--Thanks > Mahesh

Loader.
Live Chat Icon For mobile
Up arrow icon