473,789 Members | 2,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[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" AutoGenerateCol umns="False"
BorderWidth="0" GridLines="Hori zontal" Width="100%">
<FooterStyle />
<Columns>
<asp:TemplateFi eld HeaderText="&nb sp;"
SortExpression= "ARTIKELBESCHRE IBUNG">
<HeaderStyle HorizontalAlign ="Left" />
<ItemStyle HorizontalAlign ="Left"
CssClass="gridr ows" />
<ItemTemplate >
<asp:Label ID="Label1" runat="server"
Font-Bold="true" Text="Bestellun g A 123456 vom 21.12.2007"></asp:Label>
<br />
<br />
<asp:Label ID="Label2" runat="server"
Text="Bestellun g 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="Bestellun g A 123456 vom 21.12.2007"></asp:Label>
<br />
<br />
<asp:Label ID="Label2" runat="server"
Text="Bestellun g 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="Bestellun g A 123456 vom 21.12.2007"></asp:Label>
<br />
<br />
<asp:Label ID="Label2" runat="server"
Text="Bestellun g 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="Bestellun g A 123456 vom 21.12.2007"></asp:Label>
<br />
<br />
<asp:Label ID="Label2" runat="server"
Text="Bestellun g 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:TemplateFie ld>
</Columns>
<AlternatingRow Style CssClass="gridr ows" />
</asp:GridView>
Jun 27 '08 #1
0 848

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

Similar topics

0
1499
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' expects parameter '@Original_Comment', which was not supplied." Of course, the call to EventDelete was generated by Visual Studio, making it hard to debug. In fact, I nothing in the stack trace is my code. If I remove the parameter @OriginalComment...
12
2416
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
8231
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: <asp:ObjectDataSource ID="dsourceApps" runat="server" SelectMethod="getAllApplications" TypeName="AppMgr.AppManager" UpdateMethod="updateAppHdr" ConflictDetection="CompareAllValues"
0
1133
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 columns but use them to activate commands from the gridview. But when I try retrieve the values the id values disappear if theID column is hidden. It works ok if the column is not hidden. I tried another solution by implementing Templated...
0
932
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 calls after the first db hit. ... The page needs to be called ... for 3 different reasons.
4
2226
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 written seems to work fine on my local machine but when I upload it and execute it on the server the page doesn't use AJAX. (It reloads the entire page each time I make a change). I've loaded atlas on the server and I've uploaded several atalas...
0
1132
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 dropdownlists. How can the number of controls that are itemtemplates can be controlled? That is, if in fact I want to display 5 dropdownlists containing the same data ?
0
3171
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 server-side operation, using the RowCommand functionality. In IE, this all works great, but in Firefox (v2.0.0.6), clicking the above mentioned ButtonField fires off two similar AJAX requests, which is causing errors in my server-side code. ...
2
1449
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 there a "better", more efficient way to do this? Links to examples would be great.
0
9663
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9506
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10136
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6761
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5548
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2906
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.