|
 |
aspx_beginners thread: Changing TextBox Size in DataGrid - EditCommand
Message #1 by "Rob Taylor" <rob@t...> on Thu, 9 May 2002 16:00:07 -0400
|
|
Could someone please tell me how to change the size of a textbox
when using the EditCommand on a datagrid? When a user selectes
"edit" I want to make the box wider. What I am trying to do below
is producing an error -
'size' is not a member of 'System.Web.UI.WebControls.TextBox'.
Sub ShowMessages_Edit(sender As Object, e As DataGridCommandEventArgs)
ShowMessages.EditItemIndex = e.Item.ItemIndex
Dim exp as textbox = CType(e.Item.Cells(0).Controls(0), TextBox)
exp.size = "65"
BindGrid()
End Sub
Thanks,
Rob
Message #2 by Imar Spaanjaars <Imar@S...> on Thu, 09 May 2002 22:03:51 +0200
|
|
Hi Rob,
You should use the "Width" property instead.
HtH
Imar
At 04:00 PM 5/9/2002 -0400, you wrote:
>Could someone please tell me how to change the size of a textbox
>when using the EditCommand on a datagrid? When a user selectes
>"edit" I want to make the box wider. What I am trying to do below
>is producing an error -
> 'size' is not a member of 'System.Web.UI.WebControls.TextBox'.
>
>
>Sub ShowMessages_Edit(sender As Object, e As DataGridCommandEventArgs)
> ShowMessages.EditItemIndex = e.Item.ItemIndex
> Dim exp as textbox = CType(e.Item.Cells(0).Controls(0), TextBox)
> exp.size = "65"
> BindGrid()
>End Sub
>
>
>
>Thanks,
>
>
>Rob
>
|
|
 |