1.

Write A Program To Control The Column Width, Height And Alignment Of Datagrid?

Answer»
  1. DATAGRID control has the control over the rows and columns sizes that fits the HEIGHT and width of the grid. 
  2. AutoGenerateColumns property has to be False to control the column characteristics and it doesn’t let the column to generate automatically. 
  3. The column width can be created using the STYLE element for a particular column. It can ALSO set the width of the element.

The property can be set like:

<asp:BoundColumn DataField="title" SortExpression="title" 
HeaderText="Title"&GT;
<ItemStyle Width="100px"></ItemStyle>
</asp:BoundColumn>

The property can be set like:

<asp:BoundColumn DataField="title" SortExpression="title" 
HeaderText="Title">
<ItemStyle Width="100px"></ItemStyle>
</asp:BoundColumn>



Discussion

No Comment Found