ajaysharmaapjs - Thanks for your help. Unfortunately I have only been working with ASP.NET for two weeks, so I've had some difficulty applying your suggestions.
I've attached my ASP.NET source code for the page that currently works, but has the issue in the Question with the following columns getting unintentionally wider in edit mode: RegionPts, MarketPts, GrossQuota, NetQuota.
Main Topics
Browse All Topics





by: ajaysharmaapjsPosted on 2009-11-09 at 05:32:00ID: 25775710
use the EditItemTemplate portion of the gridview to control the styles of controls which are editable during runtime.
e.g.
<asp:TemplateField HeaderText="Comments">
<EditItemTemplate>
<asp:TextBox ID="txtComment" runat="server" Text='<%# Bind("cComments") %>' Font-Names="Arial" Width="450px" TextMode="MultiLine" Rows="4"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblComment" runat="server" Text='<%# Bind("cComments") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
In the above code I specified the width property of the textbox, so during the row editing event it will take a width of 450px.
If the above code doesn't helps you then please post your code.