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

Using sitemapdatasource

2 Answers 123 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
ManniAT
Top achievements
Rank 2
ManniAT asked on 21 Jul 2008, 03:04 PM
Hi,

I successfully implement a navigation using panelbar and a sitemap datasource.
Almost everthing works fine.
I navigate to a page (however) and the link is display in the panelbar.
Expanding - collapsing - everthing works.

AS LONG AS the url is exactly the same as in the datasource.

My Problem - sometimes pages are called with parameters.
So /MyPage.aspx becomes /MyPage.aspx?Parm=Something

At this moment the panelbar no longer selects the current page.
I understand that this is beause of string matching.

But is there a way to have the panelbar work regardles if a parameter is specified or not?

Or does the problem come from the sitemap datasource which does not show a "selected record"?
If so - has anyone an idea how to overcome this?

Regards

Manfred

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 21 Jul 2008, 03:12 PM
Hello Manfred Pohler,

The SiteMapProvider has a notion of CurrentNode (current url) which RadPanelBar internally uses. It seems that the CurrentNode does not work with query string arguments. You can consider setting the PersistStateInCookie property to true. This way RadPanelBar will handle by itself the selection and store it in a cookie.

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
ManniAT
Top achievements
Rank 2
answered on 21 Jul 2008, 05:17 PM
Hi,

thanks for the fast answer.
By the way -- parameters work.
If I have (in the sitemap) a url like def.aspx?ID=1 and call this page with that parameter I get the link marked.
The problem is that paramaters always change (that's their nature I guess :)).

Using persist state in cookie resulst in - links are only selected if I choose the page from the linkbar.
So for an example if I have button on a page that brings me back home - the link is not selected.
To do this would bring me a step backwards.

But - the good news is that you look for the selected in the sitemapprovider.
Maybe I can derive my own provider which filters out the paramters before selecting.

Kind regards

Manfred
Tags
PanelBar
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Atanas Korchev
Telerik team
ManniAT
Top achievements
Rank 2
Share this question
or