|
Great!
Thanks alot it's now working when i exclude FOURINONE.cs file from my project.
Regards
|
|
|
|
|
Thank you for making a great control.
Would be even better if the tree style worked in mozilla.
|
|
|
|
|
I have implemented a tree control in an asp.net project I am writing and I noticed the tree functionality breaks when run in mozilla. My tree works find in IE however.
Has anyone else seen this problem? If so do u have a good suggestion to fix it?
|
|
|
|
|
I've seen a few people ask this before but with no luck. Can someone please provide a tutorial type write up/post of how to get the ComboControl to work. I am writing an ASP.NET application in C# right now for the first time, so I'm alittle lost.
I'm not using VS.net I'm just looking for basic instructions of how to get this code integrated into my existing project.
Thanks to anyone that respons.
|
|
|
|
|
Nevermind, I got it working.
Thanks to, dloendorf for your tutorial. I missed it the my first time through the message board.
|
|
|
|
|
Hi Venky
Could you please advise how I can go about decreasing the height of the horizontal menu as I need it to be as thin as possible. I have attempted to remove the menu shadow that makes the menu quite thick but it doesn't appear to be easy to do this. I set the menu shadow to zero in the web.config file but the shadow then defaults to black. Do you know how I can remove the menu shadow completely?
btw. very nice control!
Thanks
jole1
|
|
|
|
|
I try to add this control to my project, but I can't. I clicked to add Existing Item... and added controls.aspx but I get "Error creating control" error name is "Object reference not set to an instance of an object". For that reason how can I add this control top of my project,please help me
|
|
|
|
|
I think,if Venkat Eswaran can give me controls.aspx.cs file I can solve this problem
|
|
|
|
|
When I click on main links on tab control, the sub links dont change.
|
|
|
|
|
How can I change link target in the XML . I wanna open link in a frame . How can I do. Please help me.
|
|
|
|
|
Hi
Take a look at my post on March 1st and the replies. Hopefully this should answer your question.
Cheers
Richard
|
|
|
|
|
I have problem with this error. my aspx file include this.
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="ComboDeneme.WebForm1" %>
<%@ Register TagPrefix="CONTROL" Namespace="Controls" Assembly="FOURINONE"%>
<title>WebForm1
<control:fourinone runat="server" display="H" controltype="menu" id="Fourinone" name="Fourinone">
I wrote to cs file same thing with example. and configrate my web.config but I took this error. How can I do? Somabody help me.
|
|
|
|
|
<control:fourinone runat="server" display="H" controltype="menu" id="Fourinone" name="Fourinone">
sorry. I wrote this too in the aspx file.
Must I define FOURINONE object in cs file?
|
|
|
|
|
I didnt see my sentence in the question. for that reason I writing again
<div style="Z-INDEX: 101; LEFT: 5px; POSITION: absolute; TOP: 33px">
<CONTROL:FourinOne runat="server" Display="H" Controltype="menu" ID="Fourinone" NAME="Fourinone" />
</div>
|
|
|
|
|
Hi Venky
I have the menu control working ok over frames with the change you suggested. I also had to change the code elsewhere so it you click the top level menu it also goes to the correct target and not to '_self'.
However if I use a horizontal menu in a narrow frame at the top of the page and there is not sufficient space to show all the options on a sub menu it centres itself vertically and the bottom options are cut off as they only render within that frame.
I am wondering if it possible to change something so
1. The submenu renders over the top of other frame so a long submenu is possible .
2. The submenu does not centre itself and always hangs below the top level label.
Thanks
Richard
|
|
|
|
|
Help!!!
I'm trying to modify this code to allow for forms to reside in subdirectories. It appears to be forcing all forms to reside in the root of the webpage.
I can see in the "Render" method where it's passing the "BaseURL" to the "stm_ai" java routine, but that's where it get lost .
My page is localhost/home/About/Overview.aspx. If I set my "BaseURL" in the Data.XML file for this mainmenu to "default.aspx", the URL that is generated from the menu click is:
localhost/home/About/default.aspx
and what I want is
localhost/home/default.aspx
I've tried modifying the Data.xml "BaseUrl" to "/home/default.aspx", but that returns that appended to the current directory.
Does anyone know what I need to change to remove this local directory form the URL so that I can qualify my pages in the Data.xml file?
Thanks for your help.
Rich
|
|
|
|
|
Hi Rich
I am not sure why you have a problem. I have pages in sub-folders working just by specifying "subfolder/page.aspx" in the BaseURL and URL attributes.
Cheers
Richard
|
|
|
|
|
Hi
I have a few questions.
1. What does the CongSpecific attribute of a SubMenu entry do?
2. Does the control support frames? If a put a horizontal menu in a left side frame, I want to control the contents of the right frame. I thought maybe the URLTarget attribute of SubMenu entry may allow you to specify the target frame but it did not work with my test.
3. What then is the URLTarget used for?
Thanks for the great control.
Cheers
Richard
|
|
|
|
|
I actaully meant to say vertical menu, but I guess you get the idea!
|
|
|
|
|
Hi Richard,
The CongSpecific is no where connected to this control. I have used that for my project for internal opertaions. Please dont get confused with that.
strRender.Append("stm_aix(\"p1i0\",\"p0i0\",[0,'"+mySubDataView[j]["Label"].ToString()+"',\"\",\"\",-1,-1,0,\""+mySubDataView[j]["URL"].ToString()+"\",\"_self\",'"+mySubDataView[j]["URL"].ToString()+"',\"\",\"\",\"\",0,0,0,\"\",\"\",0,0,0,0,1,\""+SubmenuBgColor+"\",0,\""+SubmenuMouseoverColor+"\",0,\"\",\"\",3,3,0,0,\"\",\"\",\""+SubmenuFontColor+"\",\""+SubmenuMouseOverFontColor+"\"]);");
first URL is for Link and second URL is for appearing on tne status bar during mouse over. You can chage the Second url by ur module name or anything
Here we have used _self as target, you can can change to anything like _parent,etc..
Venky
|
|
|
|
|
Hi Venky
Thanks for your quick reply.
I adjusted your code to
strRender.Append("stm_aix(\"p1i0\",\"p0i0\",[0,'" +
mySubDataView[j]["Label"].ToString() + "',\"\",\"\",-1,-1,0,\"" +
mySubDataView[j]["URL"].ToString() + "\"," +
"\"" + mySubDataView[j]["URLTarget"].ToString() + "\",'" +
mySubDataView[j]["URL"].ToString() +
"',\"\",\"\",\"\",0,0,0,\"\",\"\",0,0,0,0,1,\"" +
SubmenuBgColor + "\",0,\"" + SubmenuMouseoverColor +
"\",0,\"\",\"\",3,3,0,0,\"\",\"\",\"" + SubmenuFontColor +
"\",\"" + SubmenuMouseOverFontColor + "\"]);");
so it reads the frame target from the URLTarget field making it more flexible. I think you saying the URLTarget field is used for a mouse over
display, but I searched and cannot see that it is read anywhere else in the code so I will use it for this purpose.
Thanks
Richard
|
|
|
|
|
Hi
Replace the following code in the cs file inside the Menu condition
<code>
strRender.Append("<script type=\"text/javascript\" language=\"JavaScript1.2\">");
string MainMenuFontColor = System.Configuration.ConfigurationSettings.AppSettings["MainMenuFontColor"];
string MainMenuShadowColor = System.Configuration.ConfigurationSettings.AppSettings["MainMenuShadowColor"];
string MainMenubGColor = System.Configuration.ConfigurationSettings.AppSettings["MainMenubGColor"];
string MainMenuMouseoverColor = System.Configuration.ConfigurationSettings.AppSettings["MainMenuMouseoverColor"];
string SubmenuBgColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuBgColor"];
string SubmenuMouseoverColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuMouseoverColor"];
string SubmenuBorderColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuBorderColor"];
string SubmenuFontColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuFontColor"];
string SubmenuShadowColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuShadowColor"];
string SubmenuMouseOverFontColor = System.Configuration.ConfigurationSettings.AppSettings["SubmenuMouseOverFontColor"];
strRender.Append("stm_bm([\"phpjchr\",400,\"\",\"blank.gif\",0,\"\",\"\",0,0,0,0,50,1,0,0,\"\",\"\",0],this);");
DataView myDataView = new DataView(myXmlDataDocument.DataSet.Tables["MainMenu"]);
myDataView.Sort = "MenuSequence";
if(Display=="V" || Display=="v")
strRender.Append("stm_bp(\"p0\",[1,4,0,0,0,4,0,7,71,\"progid:DXImageTransform.Microsoft.Fade(overlap=.5,enabled=0,Duration=0.00)\",-2,\"\",-2,10,1,4,\""+MainMenuShadowColor+"\",\"transparent\",\"\",3,0,0,\""+MainMenuFontColor+"\"]);");
else if(Display=="H" || Display=="h")
strRender.Append("stm_bp(\"p0\",[0,4,0,0,0,4,0,7,71,\"progid:DXImageTransform.Microsoft.Fade(overlap=.5,enabled=0,Duration=0.00)\",-2,\"\",-2,10,1,4,\""+MainMenuShadowColor+"\",\"transparent\",\"\",3,0,0,\""+MainMenuFontColor+"\"]);");
for (int i = 0; i < myDataView.Count; i++){
if(isAuthorised(myDataView[i]["MainSecurity"].ToString(),SecurityType)){
strRender.Append("stm_ai(\"p0i0\",[0,'"+myDataView[i]["Label"].ToString()+"',\"\",\"\",-1,-1,0,\""+myDataView[i]["BaseURL"].ToString()+"\",\"_self\",'"+myDataView[i]["BaseURL"].ToString()+"',\"\",\"\",\"\",0,0,0,\"arrow_gray.gif\",\"arrow_gray.gif\",7,7,0,0,1,\""+MainMenubGColor+"\",0,\""+MainMenuMouseoverColor+"\",0,\"\",\"\",3,3,0,0,\""+MainMenubGColor+"\",\""+MainMenuMouseoverColor+"\",\""+MainMenuFontColor+"\",\""+MainMenuFontColor+"\",\"8pt bold Arial\",\"8pt bold Arial\",0,0]);");
DataView mySubDataView = new DataView(myXmlDataDocument.DataSet.Tables["SubMenu"]);
mySubDataView.Sort = "SubMenuSequence";
mySubDataView.RowFilter = "MenuId = " + myDataView[i]["MenuId"].ToString();
if(Display=="V" || Display=="v")
strRender.Append("stm_bp(\"p1\",[1,2,0,1,0,3,0,0,71,\"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=forward,enabled=0,Duration=1.00)\",5,\"\",-2,10,1,4,\""+SubmenuShadowColor+"\",\"\",\"\",3,1,1,\""+SubmenuBorderColor+"\"]);");
else if(Display=="H" || Display=="h")
strRender.Append("stm_bp(\"p1\",[1,4,0,1,0,3,0,0,71,\"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=forward,enabled=0,Duration=1.00)\",5,\"\",-2,10,1,4,\""+SubmenuShadowColor+"\",\"\",\"\",3,1,1,\""+SubmenuBorderColor+"\"]);");
for (int j = 0; j < mySubDataView.Count; j++){
if(isAuthorised(mySubDataView[j]["Security"].ToString(),SecurityType)){
strRender.Append("stm_aix(\"p1i0\",\"p0i0\",[0,'"+mySubDataView[j]["Label"].ToString()+"',\"\",\"\",-1,-1,0,\""+mySubDataView[j]["URL"].ToString()+"\",\"\",'"+mySubDataView[j]["URL"].ToString()+"',\"\",\"\",\"\",0,0,0,\"\",\"\",0,0,0,0,1,\""+SubmenuBgColor+"\",0,\""+SubmenuMouseoverColor+"\",0,\"\",\"\",3,3,0,0,\"\",\"\",\""+SubmenuFontColor+"\",\""+SubmenuMouseOverFontColor+"\"]);");
/*********************************************************************************/
DataView myLeafDataView = new DataView(myXmlDataDocument.DataSet.Tables["LeafMenu"]);
//myLeafDataView.Sort = "LeafMenuSequence";
myLeafDataView.RowFilter = "MenuId = " + myDataView[i]["MenuId"].ToString() +" and SubMenuId = " + mySubDataView[j]["SubMenuID"].ToString() ;
HttpContext.Current.Response.Write("outer");
strRender.Append("stm_bp(\"p1\",[1,2,0,1,0,4,0,0,71,\"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=forward,enabled=0,Duration=1.00)\",5,\"\",-2,10,1,4,\""+SubmenuShadowColor+"\",\"\",\"\",3,1,1,\""+SubmenuBorderColor+"\"]);");
for (int k = 0; k < myLeafDataView.Count; k++){
if(isAuthorised(myLeafDataView[k]["Security"].ToString(),SecurityType)){
HttpContext.Current.Response.Write("forwech");
strRender.Append("stm_aix(\"p1i0\",\"p0i0\",[0,'"+myLeafDataView[k]["Label"].ToString()+"',\"\",\"\",-1,-1,0,\""+myLeafDataView[k]["URL"].ToString()+"\",\"\",'"+myLeafDataView[k]["URL"].ToString()+"',\"\",\"\",\"\",0,0,0,\"\",\"\",0,0,0,0,1,\""+SubmenuBgColor+"\",0,\""+SubmenuMouseoverColor+"\",0,\"\",\"\",3,3,0,0,\"\",\"\",\""+SubmenuFontColor+"\",\""+SubmenuMouseOverFontColor+"\"]);");
}
}
strRender.Append("stm_ep();");
/*********************************************************************************/
}
}
strRender.Append("stm_ep();");
}
}
strRender.Append("stm_em();");
strRender.Append("</script>");</code>
Replace the contents of XSd file with
<code><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:element name="Menu" type="menuType"/>
<xsd:complexType name="menuType">
<xsd:sequence maxOccurs="unbounded">
<xsd:element name="MainMenu" type="mainMenuType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="mainMenuType">
<xsd:sequence>
<xsd:element name="SubMenu" type="SubMenuType"/>
<xsd:sequence>
<xsd:element name="LeafMenu" type="LeafMenuType"/>
</xsd:sequence>
</xsd:sequence>
<xsd:attribute name="MenuID" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="MenuSequence" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="MainSecurity" type="xsd:string"/>
<xsd:attribute name="BaseURL" type="xsd:string"/>
<xsd:attribute name="Label" type="xsd:string"/>
<xsd:attribute name="ImageUrl" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="SubMenuType">
<xsd:attribute name="SubMenuID" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="SubMenuSequence" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="Label" type="xsd:string"/>
<xsd:attribute name="URL" type="xsd:string"/>
<xsd:attribute name="URLTarget" type="xsd:string"/>
<xsd:attribute name="Security" type="xsd:string"/>
<xsd:attribute name="CongSpecific" type="xsd:string"/>
<xsd:attribute name="MenuID" type="xsd:string"/>
<xsd:attribute name="ImageUrl" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="LeafMenuType">
<xsd:attribute name="LeafMenuID" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="SubMenuID" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="LeafMenuSequence" type="xsd:nonNegativeInteger"/>
<xsd:attribute name="Label" type="xsd:string"/>
<xsd:attribute name="URL" type="xsd:string"/>
<xsd:attribute name="URLTarget" type="xsd:string"/>
<xsd:attribute name="Security" type="xsd:string"/>
<xsd:attribute name="MenuID" type="xsd:string"/>
<xsd:attribute name="ImageUrl" type="xsd:string"/>
</xsd:complexType>
</xsd:schema></code>
and the xml file should be
<code><MainMenu Label="Query Builder" BaseURL="Querybuilder.aspx" MenuID="2" MainSecurity="A" MenuSequence="2" ImageUrl="themes/triangle_blueS.gif">
<SubMenu Label="Query Maintanence" URL="Query.aspx" MenuID="2" Security="A" SubMenuID="1" SubMenuSequence="1" ImageUrl="themes/xp_documents.gif"/>
<LeafMenu Label="Create Query" URL="CreateQuery.aspx" MenuID="2" Security="A" SubMenuID="1" LeafMenuID="1" LeafMenuSequence="1" ImageUrl="themes/xp_documents.gif"/>
<LeafMenu Label="Run Query" URL="RunQuery.aspx" MenuID="2" Security="A" SubMenuID="1" LeafMenuID="1" LeafMenuSequence="1" ImageUrl="themes/xp_documents.gif"/>
<SubMenu Label="View Query" URL="ViewQuery.aspx" MenuID="2" Security="A" SubMenuID="2" SubMenuSequence="2" ImageUrl="themes/xp_newfolder.gif"/>
</MainMenu></code>
it should work file.
Venky
|
|
|
|
|
Anyone get this working? I'm having a problem. The changes suggested seem logical, but don't appear to work.
I've attempted to modify the source as instructed, but it seems to have only disabled the menu function completely. The tree appears to work, but fails to display the leafmenu elements.
Can you point me to a working source with 3 levels? If you think I've simply mixed up the source I can tell you I've done:
1) download and unzip the package from codeproject.com
2) Modified the Fourinone.cs file (the "Render" method)
3) Replace the .XSD file
4) Replaced the .XML file
Any help would be appreciated. Thanks.
Rich
|
|
|
|
|
I'm having exactly the same problem - this control is fantastic, and I would love to use it, but I need three levels. Are any working samples available?
Many Thanks,
Nate
|
|
|
|
|
Thank you Venkat!!
It worked for me, however i modified a couple of lines in the part added by venkat to handle the third level (this part is delimited by venkat with /*****) Hope it Helps!!
/*********************************************************************************/
DataView myLeafDataView = new DataView(myXmlDataDocument.DataSet.Tables["LeafMenu"]);
//myLeafDataView.Sort = "LeafMenuSequence";
myLeafDataView.RowFilter = "MenuId = " + myDataView[i]["MenuId"].ToString() +" and SubMenuId = " + mySubDataView[j]["SubMenuID"].ToString();
//HttpContext.Current.Response.Write("outer");
strRender.Append("stm_bp(\"p1\",[1,2,0,1,0,4,0,0,71,\"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=1,motion=forward,enabled=0,Duration=1.00)\",5,\"\",-2,10,1,4,\""+SubmenuShadowColor+"\",\"\",\"\",3,1,1,\""+SubmenuBorderColor+"\"]);");
for (int k = 0; k < myLeafDataView.Count; k++){
if(isAuthorised(myLeafDataView[k]["Security"].ToString(),SecurityType)){
//HttpContext.Current.Response.Write("forwech");
strRender.Append("stm_aix(\"p1i0\",\"p0i0\",[0,'"+myLeafDataView[k]["Label"].ToString()+"',\"\",\"\",-1,-1,0,\""+myLeafDataView[k]["URL"].ToString()+"\",\"\",'"+myLeafDataView[k]["URL"].ToString()+"',\"\",\"\",\"\",0,0,0,\"\",\"\",0,0,0,0,1,\""+SubmenuBgColor+"\",0,\""+SubmenuMouseoverColor+"\",0,\"\",\"\",3,3,0,0,\"\",\"\",\""+SubmenuFontColor+"\",\""+SubmenuMouseOverFontColor+"\"]);");
}
}
strRender.Append("stm_ep();");
/*********************************************************************************/
Guillermo Mejía
|
|
|
|
|