Converting from "old" TabStrip (PageViewItemCreated)

2 posts, 0 answers
  1. Andreas Kaech
    Andreas Kaech avatar
    121 posts
    Member since:
    Sep 2004

    Posted 25 Apr 2008 Link to this post

    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,
  2. Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 28 Apr 2008 Link to this post

    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.

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top