[ASP.NET] GridView & ItemTemplates

Discussion in 'ASP .Net' started by Sody, Jun 12, 2008.

  1. Sody

    Sody Guest

    Hi, is in gridview any way how to control from codebehid if an
    itemtemplate in gridview will be set to visible = true / false ?

    here is an example of gridview with more itemtemplates

    <asp:GridView ID="grdTracking" runat="server" AutoGenerateColumns="False"
    BorderWidth="0" GridLines="Horizontal" Width="100%">
    <FooterStyle />
    <Columns>
    <asp:TemplateField HeaderText="&nbsp;"
    SortExpression="ARTIKELBESCHREIBUNG">
    <HeaderStyle HorizontalAlign="Left" />
    <ItemStyle HorizontalAlign="Left"
    CssClass="gridrows" />
    <ItemTemplate>
    <asp:Label ID="Label1" runat="server"
    Font-Bold="true" Text="Bestellung A 123456 vom 21.12.2007"></asp:Label>
    <br />
    <br />
    <asp:Label ID="Label2" runat="server"
    Text="Bestellung befinden Sich in folgendem Bestellstatus"></asp:Label>
    <br />
    <br />
    <span class="stufe1">Bestellung eingegangen</span>
    <br />
    <br />
    </ItemTemplate>
    <ItemTemplate>
    <asp:Label ID="Label1" runat="server"
    Font-Bold="true" Text="Bestellung A 123456 vom 21.12.2007"></asp:Label>
    <br />
    <br />
    <asp:Label ID="Label2" runat="server"
    Text="Bestellung befinden Sich in folgendem Bestellstatus"></asp:Label>
    <br />
    <br />
    <span class="stufe2">Bestellung eingegangen
    &nbsp;&nbsp; Bestellung akzeptiert</span>
    <br />
    <br />
    </ItemTemplate>
    <ItemTemplate>
    <asp:Label ID="Label1" runat="server"
    Font-Bold="true" Text="Bestellung A 123456 vom 21.12.2007"></asp:Label>
    <br />
    <br />
    <asp:Label ID="Label2" runat="server"
    Text="Bestellung befinden Sich in folgendem Bestellstatus"></asp:Label>
    <br />
    <br />
    <span class="stufe3">Bestellung eingegangen
    &nbsp;&nbsp; Bestellung akzeptiert &nbsp;&nbsp;
    Bestellung in Bearbeitung</span>
    <br />
    <br />
    </ItemTemplate>
    <ItemTemplate>
    <asp:Label ID="Label1" runat="server"
    Font-Bold="true" Text="Bestellung A 123456 vom 21.12.2007"></asp:Label>
    <br />
    <br />
    <asp:Label ID="Label2" runat="server"
    Text="Bestellung befinden Sich in folgendem Bestellstatus"></asp:Label>
    <br />
    <br />
    <span class="stufe4">Bestellung eingegangen
    &nbsp;&nbsp; Bestellung akzeptiert &nbsp;&nbsp;
    Bestellung in Bearbeitung &nbsp;&nbsp;
    Bestellung im Versand </span>
    <br />
    <br />
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    <AlternatingRowStyle CssClass="gridrows" />
    </asp:GridView>
     
    Sody, Jun 12, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. aaapaul
    Replies:
    3
    Views:
    433
    Martin Marinov
    Jun 21, 2004
  2. Luis Esteban Valencia

    Datagrid with textboxes on itemtemplates

    Luis Esteban Valencia, Jan 26, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    347
    Luis Esteban Valencia
    Jan 26, 2005
  3. Replies:
    2
    Views:
    2,578
  4. Mr Not So Know It All

    Dynamic Repeater and ItemTemplates

    Mr Not So Know It All, Jan 20, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    890
    Mr Not So Know It All
    Jan 24, 2007
  5. Robert Pettersson

    Painfully slow GridView when using ItemTemplates and EditItemTemplates!

    Robert Pettersson, Nov 20, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    988
    Robert Pettersson
    Nov 20, 2006
Loading...

Share This Page