Link to home
Create AccountLog in
Avatar of mcrmg
mcrmg

asked on

Width in GridView

Hi,

I am trying to see if I could set the fixed width in GridView. This is what I use based on searching on Internet.

                    <asp:TemplateField HeaderText="Work Phone" SortExpression="WorkPhone" HeaderStyle-Width="20%">
                        <ItemTemplate>
                            <asp:Label ID="WorkPhone" runat="server" Text='<%#Eval("WorkPhone")%>' />
                        </ItemTemplate>
                    </asp:TemplateField>

Open in new window


But it does not work. Am I missing something? thanks
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of mcrmg
mcrmg

ASKER

thank you