[ASP.NET] GridView & ItemTemplates

S

Sody

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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top