Define the size of the edit'able fields when [Edit] in GridView (ASP.NET VS2008 C#)

Shaitan00

Junior Contributor
Joined
Aug 11, 2003
Messages
358
Location
Hell
I am using a GRIDVIEW (gvInfo) with AutoGenerateEditButton="true", when a users presses the button the row with cells defined as "readOnly="False" becomes edit'able (as expected) - so far this is exactly what I am looking for.

Now the problem is that, when the user presses EDIT the cells in question (which are now edit'able) change size (width), specifically they increase a lot - to the extend where the gridview is now totally out-of-bounds on my webpage...

Is there a way to control the size of the textbox used in the cells when the user is EDITING the row/cell?


Code:
<asp:GridView ID="gvInfo" runat="server" Height="99px" CellSpacing="5" AutoGenerateColumns="False" CellPadding="2"
                AllowPaging="False"
                AutoGenerateEditButton="true" OnRowEditing="gvRegularDosage_RowEditing"
                OnRowCancelingEdit="gvRegularDosage_RowCancelingEdit" OnRowUpdating="gvRegularDosage_RowUpdating"
                EmptyDataText="No records found" >
                <Columns>
                      ...
                      <asp:BoundField HeaderText="units" ReadOnly="false" DataField="HUMR" ItemStyle-HorizontalAlign="Left" HtmlEncode="false" />
                      ...
                </Columns>
            </asp:GridView>

Any help would be greatly appreciated.
Thanks,
 
Back
Top