Hi,
Here's the situation:
I have a search box in a master page. I expose the click event of the search button to my actual page that contains a radtabstrip control. The event then takes the keyword, and creates a new table for that keyword with the value "keyword" (let's call it SearchTab). This also means that I'm also creating a corresponding PageView that sends the keyword as a querystring to the page that's set in the "ContentURL" property, let's call it "SearchPage".
This web form contains a simple label, for which the value is retrieved from the querystring.
If the user puts a keyword and the tabstrip control does not contain a tab with the the value keyword, then I will create a new tab, otherwise, I will go and select the already existing tab.
On to the problem:
When I do a search for a new keyword, all works fine and dandy.
When I do a search for an already existing keyword, and I go to select the existing tab, nothing is displayed in the tab anymore. This keeps happening if i change tabs again and then go back to that same tab. I also tried w/ and w/o AutoPostback.
Here's the simple sample code that I'm using:
edit: I actually removed the code that sets the contentURL and replaced it by a simple calendar just to check if it might be related to that, and that's what I ended up copying. Sorry about the error, but it doesn't make a difference (just in case you're wondering).
Any ideas on why this is not working?
Thank you.
Here's the situation:
I have a search box in a master page. I expose the click event of the search button to my actual page that contains a radtabstrip control. The event then takes the keyword, and creates a new table for that keyword with the value "keyword" (let's call it SearchTab). This also means that I'm also creating a corresponding PageView that sends the keyword as a querystring to the page that's set in the "ContentURL" property, let's call it "SearchPage".
This web form contains a simple label, for which the value is retrieved from the querystring.
If the user puts a keyword and the tabstrip control does not contain a tab with the the value keyword, then I will create a new tab, otherwise, I will go and select the already existing tab.
On to the problem:
When I do a search for a new keyword, all works fine and dandy.
When I do a search for an already existing keyword, and I go to select the existing tab, nothing is displayed in the tab anymore. This keeps happening if i change tabs again and then go back to that same tab. I also tried w/ and w/o AutoPostback.
Here's the simple sample code that I'm using:
edit: I actually removed the code that sets the contentURL and replaced it by a simple calendar just to check if it might be related to that, and that's what I ended up copying. Sorry about the error, but it doesn't make a difference (just in case you're wondering).
if
(RadTabStrip1.FindTabByValue(keyword) ==
null
)
{
// Create new tab and corresponding pageview and then select it.
RadTab SearchTab =
new
RadTab(String.Format(
"Search: {0}"
, keyword), keyword);
RadPageView SearchPage =
new
RadPageView();
SearchPage.ID = keyword;
SearchPage.Controls.Add(
new
Calendar());
SearchTab.PageViewID = SearchPage.ID;
RadMultiPage1.PageViews.Add(SearchPage);
RadTabStrip1.Tabs.Add(SearchTab);
RadTabStrip1.FindTabByValue(keyword).Selected =
true
;
RadMultiPage1.FindPageViewByID(keyword).Selected =
true
;
}
else
{
// Select the already existing tab
RadTabStrip1.FindTabByValue(keyword).Selected =
true
;
RadMultiPage.FindPageViewByID(keyword).Selected =
true
;
}
Any ideas on why this is not working?
Thank you.