Hi,
I am trying to create a Org Chart Webpart in Sharepoint 2010 using RadOrgchart, I am not getting errors but it doesnt display anything in teh page. I just see a bank Page. Can someone please help me with this?
Here is the code.
protected override void CreateChildControls()
{
base.CreateChildControls();
}
protected override void OnInit(EventArgs e)
{
Page.Init += delegate(object sender, EventArgs e_Init)
{
if (ScriptManager.GetCurrent(Page) != null)
{
Page.Items.Remove(typeof(ScriptManager));
scriptManager = new RadScriptManager();
scriptManager.ID = "ScriptManager";
this.Page.Items.Add(scriptManager.GetType(), scriptManager);
this.Page.Form.Controls.Add(scriptManager);
}
};
CreateOrgChart();
base.OnInit(e);
}
private void CreateOrgChart()
{
DataTable oData = GetOrgData();
RadOrgChart oOrgChart = new RadOrgChart();
oOrgChart.DataSource = oData;
oOrgChart.DataFieldID = "NetworkID";
oOrgChart.DataFieldParentID = "ManagerID";
oOrgChart.DataTextField = "FullName";
oOrgChart.DataBind();
this.Page.Items.Add(oOrgChart);
}
I am trying to create a Org Chart Webpart in Sharepoint 2010 using RadOrgchart, I am not getting errors but it doesnt display anything in teh page. I just see a bank Page. Can someone please help me with this?
Here is the code.
protected override void CreateChildControls()
{
base.CreateChildControls();
}
protected override void OnInit(EventArgs e)
{
Page.Init += delegate(object sender, EventArgs e_Init)
{
if (ScriptManager.GetCurrent(Page) != null)
{
Page.Items.Remove(typeof(ScriptManager));
scriptManager = new RadScriptManager();
scriptManager.ID = "ScriptManager";
this.Page.Items.Add(scriptManager.GetType(), scriptManager);
this.Page.Form.Controls.Add(scriptManager);
}
};
CreateOrgChart();
base.OnInit(e);
}
private void CreateOrgChart()
{
DataTable oData = GetOrgData();
RadOrgChart oOrgChart = new RadOrgChart();
oOrgChart.DataSource = oData;
oOrgChart.DataFieldID = "NetworkID";
oOrgChart.DataFieldParentID = "ManagerID";
oOrgChart.DataTextField = "FullName";
oOrgChart.DataBind();
this.Page.Items.Add(oOrgChart);
}