This is a migrated thread and some comments may be shown as answers.

Radgridview empty row

1 Answer 224 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dra Graca Melo
Top achievements
Rank 1
Dra Graca Melo asked on 15 Jun 2010, 11:05 AM
Can I only wraptext in row header without autosizerows in radgridview ?

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 18 Jun 2010, 03:17 PM
Hello Dra Graca Melo,

I am in doubt about the result you are trying to achieve. If you are trying to set WrapText to the rows of the GridViewRowHeaderColumn you can do this by using the ViewCellFormatting event:

GridRowHeaderCellElement rowHeaderCell = e.CellElement as GridRowHeaderCellElement;
if (rowHeaderCell != null)
{
    rowHeaderCell.TextWrap = true;
}

To define the size of the column you can use:

((GridTableElement)radGridView1.GridElement).RowHeaderColumnWidth = 50;
((GridTableElement)radGridView1.GridElement).TableHeaderHeight = 50;

In case you need to set WrapText to the header cells, you can achieve it in the ViewCellFormatting event as well:

GridHeaderCellElement cell = e.CellElement as GridHeaderCellElement;
if (cell != null)
{
    cell.TextWrap = true;
}

Greetings,
Alexander
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Dra Graca Melo
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or