Naresh Bada

Naresh Bada

  • 1.8k
  • 149
  • 3.2k

how to fix some column size width in gridview?

Sep 20 2019 5:52 AM
this is my gridview page i need fix to 'RBL GL NAME ' this column fix the size . kindly tell me. 
 
 
 
this is my code:
 
<asp:GridView ID="XbrlGLGrid" runat="server" Width="500px" AutoGenerateColumns="False" onrowdatabound="XbrlGLGrid_RowDataBound">
<HeaderStyle CssClass="header" Height="15px" Width="100px" />
<FooterStyle CssClass="smallheader" />
<RowStyle CssClass="smallnavy" />
<Columns>
<asp:BoundField HeaderText="Col.No." DataField="ColNo" ItemStyle-Width="30px" HeaderStyle-Width="100px"/>
<asp:BoundField DataField="ElementName" HeaderText="RBI GL Name" ItemStyle-Horizontal ItemStyle-Width="40px" HeaderStyle-Width="100px"/>
<asp:TemplateField HeaderText="GL Code" ControlStyle-BorderWidth="1px" ItemStyle-Horizontal ItemStyle-Width="100px" HeaderStyle-Width="90px">
<ItemTemplate>
<asp:TextBox ID="txtGLCode" runat="server" CausesValidation="false" CssClass="tooltip" Width="100px" EnableViewState="true"
ToolTip="For Help, Double Click or Press F2" AutoCompleteType="Disabled" AutoPostBack="True"
OnTextChanged="txtGLCode_TextChanged"></asp:TextBox>
</ItemTemplate>
<ControlStyle BorderWidth="1px" BorderColor="Silver" />
</asp:TemplateField>
<asp:BoundField DataField="GlCode" HeaderText="Mapped GL Codes" ItemStyle-Horizontal ItemStyle-Width="200px" HeaderStyle-Width="100px"/>
<asp:BoundField DataField="Amount" HeaderText="Value" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" HeaderStyle-Width="110px" />
<asp:BoundField HeaderText="Enable" DataField="Enable" ItemStyle-CssClass="hiddencol" HeaderStyle-CssClass="hiddencol"/>
</Columns>
</asp:GridView>
 
 
 
 
 

Brought to you by:

Answers (6)