473,320 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

[ASP.NET] GridView & ItemTemplates

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>
Jun 27 '08 #1
0 824

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jim Sneeringer | last post by:
I have a GridView that loads correctly from a SQL table using a TableAdapter and stored procedures. However, when I try to delete from the GridView, I get "Procedure or Function 'EventDelete'...
12
by: Alex D. | last post by:
How can I stop asp.net from rendering XHTML istead of HTML? My javascripts are rendering wrong because of that. It is rendering &amp; to clients instead of &. Any help? Thanks, Alejandro.
13
by: anonymike | last post by:
Hello, I started working with the ObjectDataSource today. I have the select, and have been working on getting the update method to work. Here is the asp code for my Data source: ...
0
by: Mike N | last post by:
Using the Gridview control in ASP.NET i developed a a web form which displays general user information using simple databinding ad databound columns direct to a dataset. I wanted to hide my ID...
0
by: sloan | last post by:
I'm working on a application where I have 1 page which shows a GridView. I have this page working...with sorting, with paging...and I'm caching the first resultset,... to avoid unnecessary db...
4
by: Brad Baker | last post by:
I'm trying to implement a gridview control using atlas & asp.net per the following article: http://weblogs.asp.net/scottgu/archive/2005/12/26/433997.aspx My frustration is that the page I've...
0
by: Carlos | last post by:
Hi all, I just embedded a dropdownlist templatefield inside a gridview. When I look at the control in design mode, I see 5 dropdownlists, when I bind the data to the gridview, I only bind to 3...
0
by: jrnail23 | last post by:
I have a user control which contains an UpdatePanel, which contains a MultiView inside, with a GridView in one of the views. In my GridView, I have a ButtonField which is supposed to trigger a...
2
by: =?Utf-8?B?UGF1bA==?= | last post by:
I have a large, complex Gridview (itemtemplates, boundfield, hyperlink fields, etc.) I want to use this same gridview on multiple pages. Rather than copying this gridview on multiple pages, it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.