Posted 8 September 2017, 2:59 pm EST
Hello,
You would need to set the WordWrap property of the RowHeader to false, so that it does not displays the labels in two lines and later set the width of the column in the RowHeader using the GetPreferredWidth method. This method returns the width i.e. necessary to accomodate the label in the RowHeader. Here is the code for the same:
private void button1_Click(object sender, EventArgs e)
{
FarPoint.Win.Spread.CellType.EnhancedRowHeaderRenderer rhr = new FarPoint.Win.Spread.CellType.EnhancedRowHeaderRenderer();
rhr.WordWrap = false;
fpSpread1.Sheets[0].RowHeader.DefaultStyle.Renderer = rhr;
fpSpread1.Sheets[0].RowHeader.Columns[0].Width = fpSpread1.Sheets[0].RowHeader.Columns[0].GetPreferredWidth();
}
Hope it will help you. Please let me know if you have any queries further.
Thanks,
Manpreet Kaur