hi

I want to change the width of column in Gridview bound field but it is not changing .

Code Is

<asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address">
                        <ItemStyle Width="500px" />
                        </asp:BoundField>

thanx

Recommended Answers

Have you tried?

<asp:GridView ID="dad" runat="server">
        <Columns>
            <asp:BoundField ItemStyle-Width="500px" />
        </Columns>
    </asp:GridView>
Jump to Post

All 5 Replies

Have you tried?

<asp:GridView ID="dad" runat="server">
        <Columns>
            <asp:BoundField ItemStyle-Width="500px" />
        </Columns>
    </asp:GridView>

didn't work

What croker10 posted, works for me.
If you're still having problems with that, try adding the columns/rows data dinamically on server side

<asp:TextBox ID="instorid" width="40px" runat="server"></asp:TextBox>

Full Source : Asp.Net GridView Tutorial

Mitch

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.