8 Answers, 1 is accepted
Thank you for your question.
The WrapText is a property of GridViewColumn:
Please review this help article for more details concerning RadGridView columns.
I hope it helps.
the Telerik team
Can I wrapText specific cells and not the column, the posted above shows how to Wrap a column.
What I need is to wrapText of specific cells or rows
In Microsoft Grid, we used: Gridview.rows(1).cells(1).Style.WrapMode = DataGridViewTriState.True
The posted above shows how to WrapText a column.
Could we WrapText a specific Cell ?
In Microsoft Grid, we use Gridview.Rows(1).Cells(1).Style.WrapMode=DataGridViewTriState.True
Thank you for writing.
You can use the CellFormatting event do achieve the desired functionality. Here is also a small sample:
I hope this helps.
I too facing the same issue. while exporting the data from grid to excel i am using the below code...
Dim spreadExporter As Telerik.WinControls.Export.GridViewSpreadExport = New Telerik.WinControls.Export.GridViewSpreadExport(griddata)
spreadExporter.ExportHierarchy = True
spreadExporter.ExportVisualSettings = True
If the column data is more i am not able to export. it is showing the error "code--2146233086:columnWidth should be greater or equal than 0 and less or equal than 2000."
But if "spreadExporter.ExportVisualSettings = False" able to export but the excel format getting disturbed.
This seems to be a known issue and it is already logged in our Feedback Portal. The issue is fixed in the latest version. A workaround for previous versions is available here: UI for Winforms Feedback Portal - FIX. RadGridView - exception, when the grid has a column wider than 2000 and the grid, is exported.
I hope this will be useful.
Thanks for your above help .I use below code to fix the Grid Width and able to fix it.
For Each col As GridViewDataColumn In gridview.Columns
Dim xc As Integer = col.Index
Dim xcx As Double = col.Width
If (xcx > 2000) Then
col.Width = 2000
Dim vvv As String = col.WrapText
But now I am getting Error of height "-2146233086-rowHeight should be greater or equal than 0 and less or equal than 600." I try to implement the same logic but in a single row each cell row height is different. And I am not able to track each cell row height. Only I am getting the standard row height. Please help to fix it .
For the row height, you can override the SetWorksheetRowHeight method and use the same approach.
Let me know how this works for you.