Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Add a Tree Menu to DataGrid Header Text

, 9 Nov 2005 CPOL
This article shows how to add a JavaScript tree menu to a DataGrid head text.
<%@ Page language="c#" Codebehind="HeaderTextWithTreeMenu.aspx.cs" AutoEventWireup="false" Inherits="DataGridWithTreeMesu.HeaderTextWithTreeMenu" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>HeaderTextWithTreeMenu</title>
		<meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="HeaderTextWithTreeMenu" method="post" runat="server">
			<asp:Button ID="bnDate" style="DISPLAY: none" Runat="server"></asp:Button>
			<asp:DataGrid id="DataGrid1" Font-Size="12pt" EnableViewState="False" BorderWidth="2px" BorderColor="#CC9966" CellPadding="2" style="Z-INDEX: 101; LEFT: 100px; POSITION: absolute; TOP: 47px" runat="server" AutoGenerateColumns="False">
				<Columns>
					<asp:BoundColumn DataField="LastName" HeaderText="Last Name" ItemStyle-Width="150px"></asp:BoundColumn>
					<asp:BoundColumn DataField="FirstName" HeaderText="First Name" ItemStyle-Width="150px"></asp:BoundColumn>
					<asp:BoundColumn DataField="Date" HeaderText="_Date" ItemStyle-Width="150px"></asp:BoundColumn>
				</Columns>
			</asp:DataGrid></form>
	</body>
</HTML>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Florence FZ Li
Web Developer
United States United States
M.S.: Computer Science, B.S.: Physics, MCSD: .NET, MCSD: VS 6
 
Florence currently works at Confident Software, Inc. Atlanta, U.S.A. Besides programming, during her spare time she enjoys opera.

| Advertise | Privacy | Mobile
Web02 | 2.8.141029.1 | Last Updated 9 Nov 2005
Article Copyright 2005 by Florence FZ Li
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid