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.
Unfortunately, activation email could not send to your email. Please try again.

Set column size for RowHeader column

Thread ID:

Created:

Updated:

Platform:

Replies:

116458 May 27,2014 06:28 PM Jun 4,2014 05:53 AM WPF 1
loading
Tags: GridDataControl
Mike Anderson
Asked On May 27, 2014 06:28 PM

   I've turned on row header (ShowRowHeader="True") for a GridDataControl. I know it's common to show an arrow here when the row is selected, but I'm writing a number into those cells - essentially a row number. When the numbers get into tripple digit, they are truncated and manual resize for that column is disabled. Can someone suggest how I can resize that column - for example, size it to the cell contents since there is no Header Title to size it to.    

 


Ashok N [Syncfusion]
Replied On June 4, 2014 05:53 AM

Hi Mike,

Thank you for contacting Syncfusion Support.

You can change the column width of the RowHeader by using ColumnWidths property in the dataGrid.Model as shown in the following code example:

Void dataGrid_Loaded(object sender, RoutedEventArgs e)

{

    this.dataGrid.Model.ColumnWidths[0] = 50;

}


Please let us know if you have any queries.
Thanks,
Ashok


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;