N
news.microsoft.com
Hello there,
I need to add specific functionality to an Infragistics TreeView control.
So I decided to inherit from create the Infragistics control and create my
own one.
Please tell me what I am doing wrong.
1) First, you add to a new page your Infragistics control and then make the
changes you want to mimic your expected behaviour.
2) Second, you rename the new page to *.ASCX
3) Third, you rename the <%@ Page ... to <% @Control...
4) Fourth, you add a ASPX page to test the new control.
5) Fifth, and this is where I get lost, you drop the newly created component
on your ASPX form
Well, here is my problem.
1) When droppping the control the ASPX form, Visually at design time, it
does not display appear as on the ASCX.
2) When I right click on my control, it does not show the Infragistics
PopupMenu.
3) On the CodeBehind, I do not get a variable reference to my control.
Filippo.
Here is the code of my Control.
==========================
<%@ Register TagPrefix="ignav"
Namespace="Infragistics.WebUI.UltraWebNavigator"
Assembly="Infragistics.WebUI.UltraWebNavigator.v2" %>
<%@ Control Language="c#" AutoEventWireup="false"
Codebehind="cmTree.ascx.cs" Inherits="cmTree.cmTree"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<ignav:ultrawebtree id="trvMain" runat="server" BackColor="#F1F1F1"
ForeColor="#102B46" Height="247px" Width="224px" FileFlags="StylesOnly"
Cursor="hand" Font-Size="11px" Font-Names="Verdana" Indentation="15"
ExpandImage="plus.gif" CollapseImage="minus.gif"
JavaScriptFilename="/ig_scripts2/ig_webtree2.js"
ImageDirectory="/ig_Images2/" WebTreeTarget="ClassicTree"
HoverClass="HoverClass">
<Styles>
<ignav:Style Font-Size="11px" Font-Names="Verdana" Font-Bold="True"
ForeColor="#102B46" CssClass="DefaultItemClass"></ignav:Style>
<ignav:Style Font-Size="11px" Font-Names="Verdana" ForeColor="#102B46"
CssClass="TreeClass"></ignav:Style>
<ignav:Style Font-Size="11px" Font-Names="Verdana" Font-Bold="True"
ForeColor="#FF6600" CssClass="HoverClass"></ignav:Style>
<ignav:Style Font-Size="11px" Font-Names="Verdana" ForeColor="#FF6600"
CssClass="HoverSubClass"></ignav:Style>
</Styles>
<Nodes>
<ignav:Node TagString="" Expanded="True" Text="1 - ONE" HiliteClass=""
CssClass="">
<Style Font-Bold="True" ForeColor="#FF6600">
</Style>
</ignav:Node>
<ignav:Node TagString="" Text="2 - TWO" HiliteClass="" CssClass="">
<Style Font-Bold="True">
</Style>
</ignav:Node>
</Nodes>
<Levels>
<ignav:Level LevelHoverClass="" LevelHiliteClass="" LevelClass=""
Index="0"></ignav:Level>
<ignav:Level LevelHoverClass="HoverSubClass" LevelClass="TreeClass"
Index="1"></ignav:Level>
</Levels>
</ignav:ultrawebtree>
==========================
AND THIS IS WHAT APPEARS ON MY TEST FORM
==========================
<%@ Page language="c#" Codebehind="WebForm2.aspx.cs" AutoEventWireup="false"
Inherits="cmTree.WebForm2" %>
<%@ Register TagPrefix="uc1" TagName="cmTree" Src="cmTree.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm2</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="WebForm2" method="post" runat="server">
<uc1:cmTree id="CmTree1" runat="server"></uc1:cmTree>
</form>
</body>
</HTML>
==========================
BUT LIKE I SAID, I GET NOT REFERENCE ON MY CODE BEHIND CS FILE.
?????
I need to add specific functionality to an Infragistics TreeView control.
So I decided to inherit from create the Infragistics control and create my
own one.
Please tell me what I am doing wrong.
1) First, you add to a new page your Infragistics control and then make the
changes you want to mimic your expected behaviour.
2) Second, you rename the new page to *.ASCX
3) Third, you rename the <%@ Page ... to <% @Control...
4) Fourth, you add a ASPX page to test the new control.
5) Fifth, and this is where I get lost, you drop the newly created component
on your ASPX form
Well, here is my problem.
1) When droppping the control the ASPX form, Visually at design time, it
does not display appear as on the ASCX.
2) When I right click on my control, it does not show the Infragistics
PopupMenu.
3) On the CodeBehind, I do not get a variable reference to my control.
Filippo.
Here is the code of my Control.
==========================
<%@ Register TagPrefix="ignav"
Namespace="Infragistics.WebUI.UltraWebNavigator"
Assembly="Infragistics.WebUI.UltraWebNavigator.v2" %>
<%@ Control Language="c#" AutoEventWireup="false"
Codebehind="cmTree.ascx.cs" Inherits="cmTree.cmTree"
TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<ignav:ultrawebtree id="trvMain" runat="server" BackColor="#F1F1F1"
ForeColor="#102B46" Height="247px" Width="224px" FileFlags="StylesOnly"
Cursor="hand" Font-Size="11px" Font-Names="Verdana" Indentation="15"
ExpandImage="plus.gif" CollapseImage="minus.gif"
JavaScriptFilename="/ig_scripts2/ig_webtree2.js"
ImageDirectory="/ig_Images2/" WebTreeTarget="ClassicTree"
HoverClass="HoverClass">
<Styles>
<ignav:Style Font-Size="11px" Font-Names="Verdana" Font-Bold="True"
ForeColor="#102B46" CssClass="DefaultItemClass"></ignav:Style>
<ignav:Style Font-Size="11px" Font-Names="Verdana" ForeColor="#102B46"
CssClass="TreeClass"></ignav:Style>
<ignav:Style Font-Size="11px" Font-Names="Verdana" Font-Bold="True"
ForeColor="#FF6600" CssClass="HoverClass"></ignav:Style>
<ignav:Style Font-Size="11px" Font-Names="Verdana" ForeColor="#FF6600"
CssClass="HoverSubClass"></ignav:Style>
</Styles>
<Nodes>
<ignav:Node TagString="" Expanded="True" Text="1 - ONE" HiliteClass=""
CssClass="">
<Style Font-Bold="True" ForeColor="#FF6600">
</Style>
</ignav:Node>
<ignav:Node TagString="" Text="2 - TWO" HiliteClass="" CssClass="">
<Style Font-Bold="True">
</Style>
</ignav:Node>
</Nodes>
<Levels>
<ignav:Level LevelHoverClass="" LevelHiliteClass="" LevelClass=""
Index="0"></ignav:Level>
<ignav:Level LevelHoverClass="HoverSubClass" LevelClass="TreeClass"
Index="1"></ignav:Level>
</Levels>
</ignav:ultrawebtree>
==========================
AND THIS IS WHAT APPEARS ON MY TEST FORM
==========================
<%@ Page language="c#" Codebehind="WebForm2.aspx.cs" AutoEventWireup="false"
Inherits="cmTree.WebForm2" %>
<%@ Register TagPrefix="uc1" TagName="cmTree" Src="cmTree.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm2</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="WebForm2" method="post" runat="server">
<uc1:cmTree id="CmTree1" runat="server"></uc1:cmTree>
</form>
</body>
</HTML>
==========================
BUT LIKE I SAID, I GET NOT REFERENCE ON MY CODE BEHIND CS FILE.
?????