Organizational Research By

Surprising Reserch Topic

asp net setting width of databound column in gridview using -'c#,asp.net,gridview'


asp net setting width of databound column in gridview  using -'c#,asp.net,gridview'

I have a GridView which uses BoundField for columns. I am trying to set a maxwidth for my UserInfo column.

I have tried many many ways but non of them work. Below is the code for my GridView :

<asp:GridView ID="GridView1" AutoGenerateEditButton="True"
ondatabound="gv_DataBound" runat="server" DataSourceID="SqlDataSource1"
AutoGenerateColumns="False">

<Columns>
                <asp:BoundField HeaderText="UserId"
                DataField="UserId"
                SortExpression="UserId"></asp:BoundField>

                <asp:BoundField HeaderText="Username"
                DataField="Username"
                SortExpression="Username"></asp:BoundField>

                <asp:BoundField HeaderText="UserInfo"
                DataField="UserInfo"
                SortExpression="UserInfo"></asp:BoundField>

                </Columns>
</asp:GridView>


Looking for suggestions on how I can set the width of a specific column, which is my UserInfo column.
    
asked Sep 7, 2015 by rajesh
0 votes
12 views



Related Hot Questions



Government Jobs Opening


...