1,105,546 Community Members

how to change width of column in Gridview Bound field

Member Avatar
sbglobal
Light Poster
30 posts since Aug 2010
Reputation Points: -3 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
croker10
Junior Poster in Training
67 posts since Jun 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 6 [?]
Skill Endorsements: 0 [?]
 
0
 

Have you tried?

<asp:GridView ID="dad" runat="server">
        <Columns>
            <asp:BoundField ItemStyle-Width="500px" />
        </Columns>
    </asp:GridView>
sdsdsdsdsdsd
Newbie Poster
1 post since Mar 2014
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
Unverified Member
 
0
 

didn't work

Member Avatar
Joao_2
Newbie Poster
4 posts since Feb 2014
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

Member Avatar
JobPencil
Light Poster
27 posts since Feb 2014
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 
You
Post:
Start New Discussion
View similar articles that have also been tagged: