[RESOLVED]Dropdown List inside a Gridview Width not same

I have a gridview with a DropdownList. When I click on EDIT, the DropDown List is a lot shorter in

width  than the DropDownList in the Footer.  They all have the same Pixel size.

The top line "1001" before Edit

The Dropdownlist  that shows "1001_G" is in Edit mode.

The Dropdownlist that shows "1001_General Programmatic Expenditures" is in the Footer.

Here is a snippet of the column:

<asp:TemplateField HeaderText="testheader" ControlStyle-Width="150px" HeaderStyle-Width="150px" ItemStyle-Width="150px" >
<ControlStyle Width="150px" />
<HeaderStyle Width="150px" />
<asp:DropDownList ID="ddtestEdit" runat="server" DataSourceID="SqltestDesc" Width="150px"
DataTextField="test_TITLE" DataValueField="test_NUMBER"
SelectedValue=’<%# Bind("test_NUMBER") %>’>


Any suggestion?




Even though I had



         <ControlStyle Width="150px" />   <– This at top of template field

        [ Drop down list, Label, etc]

                <ControlStyle Width="65px" />   <– this was at the very bottom.  REMOVE this and it solved my problem.

I hope this helps someone else.

Leave a Reply