Welcome Guest Search | Active Topics | Sign In | Register

Menu ItemCreated Options
Ray
Posted: Monday, June 25, 2007 6:40:45 AM
Rank: Newbie
Groups: Member

Joined: 6/25/2007
Posts: 5
Please can some one explain why i can't raise the ItemCreated event in this code? It creates the menu but it will always hit the item clicked event instead of the itemcreated event on load.

thanks


using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace KFFunds.Admin.CheckIN
{
/// <summary>
/// Summary description for WebForm1.
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected EO.Web.SlideMenu SlideMenu1;

private void Page_Load(object sender, System.EventArgs e)
{
//ContextMgr myContext=(ContextMgr)Session["ContextObj"];
string ConnectString="Connect Timeout=20; User ID=vvvv; Password=YYYYYY; Initial Catalog=inetWorkMasterdb; Data Source=klkd.net; Trusted_Connection=False;Pooling=False";
DataSet DSID=KFFunds.Classes.dal.DataAccessLayer.SqlHelper.ExecuteDataset(
ConnectString,System.Data.CommandType.StoredProcedure,
"web_get_menu",
new SqlParameter("@pagename", "Checkin.aspx"),
new SqlParameter("@folder", "Checkin"),
new SqlParameter("@userlevel", "500"),
new SqlParameter("@menutype", "left"));
// Get the DataColumn objects from two DataTable objects in a DataSet.
DataColumn parentCol;
DataColumn childCol;
// Code to get the DataSet not shown here.
parentCol = DSID.Tables[0].Columns["menuitemID"];
childCol = DSID.Tables[0].Columns["ParentID"];
// Create DataRelation.
DataRelation relCustOrder;
relCustOrder = new DataRelation("relation", parentCol, childCol);
relCustOrder.Nested=true;
// Add the relation to the DataSet.
DSID.Relations.Add(relCustOrder);

SlideMenu1.DataSource=DSID;
SlideMenu1.DataBind();
// Put user code to initialize the page here
}
private void SlideMenu1_ItemClick(object sender, EO.Web.NavigationItemEventArgs e)
{
// Response.End();
Response.Write("<br>br><br>" + string.Format("Menu item '{0}' was CLICKED.", ((EO.Web.MenuItem)e.NavigationItem).Text.ToString()));
}
private void SlideMenu1_ItemCreated(object sender, EO.Web.NavigationItemEventArgs e)
{
// Response.End();
Response.Write(string.Format("Menu item '{0}' was created.", ((EO.Web.MenuItem)e.NavigationItem).Text.ToString()));
}

#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
this.SlideMenu1.ItemClick += new EO.Web.NavigationItemEventHandler(this.SlideMenu1_ItemClick);
this.SlideMenu1.ItemCreated += new EO.Web.NavigationItemEventHandler(this.SlideMenu1_ItemCreated);
}
#endregion
}
}
eo_support
Posted: Monday, June 25, 2007 7:36:28 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,098
Hi Ray,

Thanks for posting your question here. We have confirmed that this a bug and posted an update build that addressed this problem. Please see your private messages for download location.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.