Results 1 to 7 of 7

Thread: <asp:TemplateColumn> of a DataList

  1. #1

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: <asp:TemplateColumn> of a DataList

    Quote Originally Posted by Wokawidget
    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.

    e.g
    Code:
    <asp:TemplateColumn SortExpression="Title" HeaderText="Title">
    			
                                   <HeaderStyle Width="900"></HeaderStyle>
    				<ItemTemplate>
    					your stuff here 
    				</ItemTemplate>
                                </asp:TemplateColumn>
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  3. #3
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    Re: <asp:TemplateColumn> of a DataList

    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:
    1. <ItemTemplate>
    2.    <asp:Button Width="100"></asp:Button>
    3. </ItemTemplate>
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  4. #4
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: <asp:TemplateColumn> of a DataList

    Quote Originally Posted by Memnoch1207
    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:
    1. <ItemTemplate>
    2.    <asp:Button Width="100"></asp:Button>
    3. </ItemTemplate>
    Memnoch, the <HeaderStyle> seems to work fine for me.

    Am I missing somethng?
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  5. #5

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    Re: <asp:TemplateColumn> of a DataList

    Hmmm...whats the difference between building the foundations of the datagrid in XML, or dynamically adding them at runtime?

    Woka

  6. #6

  7. #7
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: <asp:TemplateColumn> of a DataList

    Quote Originally Posted by Wokawidget
    Hmmm...whats the difference between building the foundations of the datagrid in XML, or dynamically adding them at runtime?

    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..
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width