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

Converting from "old" TabStrip (PageViewItemCreated)

1 Answer 72 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Andreas Kaech
Top achievements
Rank 1
Andreas Kaech asked on 25 Apr 2008, 05:20 PM
Hi,
by converting the TabStrip from the "old" Control, I run into the following problem:
I created dynamically a RadEditor Control in a dynamically created PageView:
In the event PageViewItemCreated(PageView view, int ViewIndex) the RadEditor gets the ID "editor"+ViewIndex. That worked great.
Now in the new event PageViewCreated(object sender, RadMultiPageEventArgs e), I tried the same with e.PageView.Index.
But the following error occurs: "There are several Controls with ID editor0..." (I tried to translate from german ;-)
What's here the difference to the "old" event handler?

Thanks for answering,
Andreas

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 28 Apr 2008, 10:56 AM
Hello Andreas Kaech,

There is one difference between the old PageViewItemCreated event and the new PageViewCreated. The old event was fired only after postback whilst the new event is fired always (even on initial load). I presume you are creating the editor outside the PageViewCreated event handler (as was suggested in the "old" way). However now the editor will be created twice hence the duplicate id error. If you instantiate the editor only during PageViewCreated you should avoid that error.

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TabStrip
Asked by
Andreas Kaech
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or