I have a RadGrid From that I have the AutoEdit Turned on - I am am trying to make a couple of the Fields in the "PopUp" Edit Form be multiline as they are of type Ntext and are large. Currently they are just smaller type default Text Cells and cannot see all of the text. Trying to get them to be Multiline and maybe Scrollable.. Below is my code that I have behind in my .aspx.vb code for the page - but it is not making anything happen.
For Edit item.
For Edit item.
Protected
Sub
RadGrid2_ItemDataBound(sender
As
Object
, e
As
GridItemEventArgs)<BR>
If
TypeOf
e.Item
Is
GridEditFormItem
AndAlso
e.Item.IsInEditMode
Then
<BR>
Dim
editItem
As
GridEditFormItem = TryCast(e.Item,
GridEditFormItem)<BR>
Dim
editTable
As
Table =
TryCast(TryCast(editItem.EditFormCell,
GridEditFormItem.EditFormTableCell).Controls(7).Controls(7),
Table)<BR>editTable.Width = Unit.Percentage(100)<BR>
Dim
textBox
As
TextBox =
DirectCast
(editItem(
"Corrective Action"
).Controls(7),
TextBox)<BR>textBox.TextMode = TextBoxMode.MultiLine<BR>TryCast(textBox.Parent,
TableCell).Width = Unit.Percentage(100)<BR>textBox.Width =
Unit.Percentage(100)<BR>
End
If
<BR>
End
Sub
For Create Item
Protected
Sub
RadGrid2_ItemCreated(sender
As
Object
, e
As
GridItemEventArgs)<BR>
If
TypeOf
e.Item
Is
GridEditFormItem
AndAlso
e.Item.IsInEditMode
Then
<BR>
Dim
editItem
As
GridEditFormItem = TryCast(e.Item,
GridEditFormItem)<BR>
Dim
editTable
As
Table =
TryCast(TryCast(editItem.EditFormCell,
GridEditFormItem.EditFormTableCell).Controls(7).Controls(7),
Table)<BR>editTable.Width = Unit.Percentage(100)<BR>
Dim
textBox
As
TextBox =
DirectCast
(editItem(
"Corrective Action"
).Controls(7),
TextBox)<BR>textBox.TextMode = TextBoxMode.MultiLine<BR>TryCast(textBox.Parent,
TableCell).Width = Unit.Percentage(100)<BR>textBox.Width =
Unit.Percentage(100)<BR>
End
If
<BR>
End
Sub