This is a migrated thread and some comments may be shown as answers.

RadPanelBar child's NavigationUrl from dateset

1 Answer 85 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 19 May 2010, 05:14 AM

Hope someone can help me with this... It seems like it should be an easy thing to do but the solution evades me.

I have a RadPanel on my aspx page that is databound from my code behind. IF I do not call a method from an event the RadPanel drops down and shows the subnavigation, however the navigationUrl does not get created. I have tried several event calls, like onItemCreated or onDateBound but nothing seems to populate the sitenavigationURL.

Here is my codefront

<script type="text/javascript">

function CollapseAllItems()

{

var panelbar = <%= RadPanelBar1.ClientID %>

for (var i=0; i<panelbar.Items.length; i++)

{

panelbar.Items[i].Expand();

}

}

</script>

<radP:RadPanelbar ID="RadPanelBar1" runat="server" RadControlsDir="~/RADCONTROLS" SkinsPath="/skins/menu/"

Skin="fnSub" ExpandMode="SingleExpandedItem" ExpandAnimation-Duration="3" ExpandAnimation-Type="OutSine" onD>
<%--OnItemCreated="RadPanelBar1_ItemDataBound"--%>

</radP:RadPanelbar>


 

SqlDataAdapter

 

da5 = new SqlDataAdapter(cmd5);

 

 

DataSet ds5 = new DataSet();

 

da5.Fill(ds5,

"navigation");

 

 

//Bind ds to Radpanelbar

 

 

 

 

RadPanelBar1.DataTextField =

"navigationName";

 

RadPanelBar1.DataFieldID =

"navigationId";

 

RadPanelBar1.DataFieldParentID =

"parentNavigationId";

 

 

//RadPanelBar1.DataNavigateUrlField = "navigationFullUrl";

 

 

 

 

RadPanelBar1.DataSource = ds5;

RadPanelBar1.DataMember =

"navigation";

 

RadPanelBar1.DataBind();

 

protected

 

void RadPanelBar1_ItemDataBound(object sender, Telerik.WebControls.RadPanelbarEventArgs e)

 

{

 

if (DataBinder.Eval(e.Item.DataItem, "navigationTarget") != DBNull.Value)

 

{

e.Item.Target = (

string)DataBinder.Eval(e.Item.DataItem, "navigationTarget");

 

}

 

 

}

 

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 20 May 2010, 02:01 PM
Hello Mike,

The Classic RadControls are no more supported by our team.
You should upgrade to RadControls for ASP.NET AJAX.

Sorry!

Regards,
Nikolay Tsenkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
PanelBar
Asked by
Mike
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or