1

ラジオ ボタンでカバーされた 4 つの列のうち、8 つの列を含むグリッドがあります。各列を間隔で均等に分割したいのですが、うまくいきませんでしたか? 私は何をすべきか ??/

<asp:GridView ID="gvRelatives" runat="server" AutoGenerateColumns="False" EmptyDataText="Sorry, No Records Available !" CellPadding="4" ForeColor="#333333" GridLines="None"  CellSpacing ="2" onselectedindexchanged="gvRelatives_SelectedIndexChanged" AutoPostBack="True" onrowcreated="gvRelatives_RowCreated"                         onrowdatabound="gvRelatives_RowDataBound" BorderWidth ="2"
ondatabound="gvRelatives_DataBound" EnableSortingAndPagingCallbacks="False" >
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#EFF3FB" HorizontalAlign="center" />
<Columns>
<%--<asp:BoundField DataField="QTN_NO" HeaderText="Question Number" SortExpression="Name" InsertVisible ="false" />--%>
<asp:BoundField DataField="QTN_DESC" HeaderText="Question Description" SortExpression="Name" InsertVisible ="false"  />
<asp:BoundField DataField="SQTN_NO" HeaderText="Sub Question No" SortExpression="Name" />
<asp:BoundField DataField="SQTN_DESC" HeaderText="Sub Question Name" SortExpression="Name" />
<asp:TemplateField HeaderText ="Strongly Disagree"></asp:TemplateField>
<asp:TemplateField HeaderText ="Disagree"></asp:TemplateField>
<asp:TemplateField HeaderText ="Agree"></asp:TemplateField>
<asp:TemplateField HeaderText ="Strongly Agree"></asp:TemplateField>
</Columns>
<asp:GridView>
4

2 に答える 2

1

Add width to each header BoundField Element.

<asp:BoundField DataField="Title" HeaderText="Title">  
<HeaderStyle HorizontalAlign="Center" Width="400"></HeaderStyle>
</asp:BoundField>`
于 2013-11-27T02:52:22.227 に答える
1

各フィールドに幅の値を入力してみてください

      <asp:BoundField DataField="QTN_NO" HeaderText="Question Number" SortExpression="Name" Width="100px" InsertVisible ="false"/>
于 2012-05-06T00:11:05.550 に答える