4 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 15 May 2009, 06:33 AM
Hello Christian,
By setting the property Wrap="True" for the particular row Itemstyle will wrap the column cell's content if it is too long and auto-adjust the height of row.
ASPX:
If you want to set the height of row to desired in code behind, then you can try the following code snippet as well.
CS:
Thanks,
Shinu.
By setting the property Wrap="True" for the particular row Itemstyle will wrap the column cell's content if it is too long and auto-adjust the height of row.
ASPX:
| <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" |
| UniqueName="CompanyName"> |
| <ItemStyle Wrap="true" Width="50px"/> |
| </telerik:GridBoundColumn> |
If you want to set the height of row to desired in code behind, then you can try the following code snippet as well.
CS:
| protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) |
| { |
| if(e.Item is GridDataItem) |
| { |
| GridDataItem item = (GridDataItem)e.Item; |
| item.Height = Unit.Pixel(50); |
| } |
| } |
Thanks,
Shinu.
0
Christian
Top achievements
Rank 1
answered on 15 May 2009, 06:53 AM
I have triied wrap = true but it doesn't work:
Christian
| boundColumn = New GridBoundColumn |
| boundColumn.DataField = "WERT_ALT" |
| boundColumn.UniqueName = "WERT_ALT" |
| boundColumn.HeaderStyle.Width = Unit.Pixel(180) |
| boundColumn.ItemStyle.Wrap = True |
| g.MasterTableView.Columns.Add(boundColumn) |
Christian
0
Christian
Top achievements
Rank 1
answered on 26 May 2009, 08:54 AM
has someone a solution?
Christian
Christian
0
Accepted
Princy
Top achievements
Rank 2
answered on 26 May 2009, 09:52 AM
Hello Christian,
If your cell content is long enough and there are no empty spaces whithin the text then the text can break the cells and can appear outside the cell border. This is truly browser behavior and is found to happen with all browsers except IE . A possible solution is to try setting the TableLayout property of the MasterTableView to Fixed . This should enable long text to be clipped even if there are no empty spaces within the text.
Thanks
Princy.
If your cell content is long enough and there are no empty spaces whithin the text then the text can break the cells and can appear outside the cell border. This is truly browser behavior and is found to happen with all browsers except IE . A possible solution is to try setting the TableLayout property of the MasterTableView to Fixed . This should enable long text to be clipped even if there are no empty spaces within the text.
Thanks
Princy.