How can a set the widths of these columns???
Woka
Printable View
How can a set the widths of these columns???
Woka
Specify the width in the <HeaderStyle> tag. You can specify one for each template column.Quote:
Originally Posted by Wokawidget
e.g
Code:<asp:TemplateColumn SortExpression="Title" HeaderText="Title">
<HeaderStyle Width="900"></HeaderStyle>
<ItemTemplate>
your stuff here
</ItemTemplate>
</asp:TemplateColumn>
You can't set the width of the ItemTemplate itself, but you can set the width of any control or image you are displaying within the ItemTemplate.
VB Code:
<ItemTemplate> <asp:Button Width="100"></asp:Button> </ItemTemplate>
Memnoch, the <HeaderStyle> seems to work fine for me.Quote:
Originally Posted by Memnoch1207
Am I missing somethng?
Hmmm...whats the difference between building the foundations of the datagrid in XML, or dynamically adding them at runtime?
Woka
Cheers for your answers :D
Woka
Well if you are doing it manually you are able to see how it looks in design time, apart from that I dont see too many difference. Though I prefer doing it manually with HTML rather than Code Behind. Personal preference i guess..Quote:
Originally Posted by Wokawidget