Server side Method for TabStrip Like the Client Side scrollIntoView()

4 posts, 1 answers
  1. Gaurav
    Gaurav avatar
    6 posts
    Member since:
    Jun 2010

    Posted 22 Jun 2010 Link to this post

    Hi ,

    I am adding tabs dynamically and its working fine and scrolling is also implemented and working fine .
    But  when i add the tab i want to scroll through it and it will be shown to me .There is a client side event that i get from the
    Support from telerik that is  scrollIntoView() but as i am generating my tabs from code behind i want the same feature will be implemented from the Server-side.


    Is there any Method that can give me the same functionality from server side.I need this solution urgently .
    if not then  in future is telerik is going to provide the functionality from server side also.

    Please guide me and answer .

    Thanks
    Gaurav





  2. Answer
    Yana
    Admin
    Yana avatar
    5043 posts

    Posted 22 Jun 2010 Link to this post

    Hello Gaurav,

    Currently there's no such server-side method, but you can execute client-side code from the code-behind as it's explained in this blog post.

    Kind regards,
    Yana
    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
  3. Gaurav
    Gaurav avatar
    6 posts
    Member since:
    Jun 2010

    Posted 23 Jun 2010 Link to this post

    Hi i have used that client function from my code behind class and its not working .It doesn't  scrolls. I followed your instruction and uses the blog artical.
    Even the RegisterStartupScript is only to register the javascript at the end of body tag so its not get executed from code behind function .


    I am not able to even get the alert from javascript registration process from the code behind class so if there is any other way to sort out  this problem then please tell me the answer .

     


     Javascript function i made in HTML

      function clientSelectedTab() {
                    alert($find('<%= RadTabStripILMain.ClientID %>').get_selectedTab());
                    $find('<%= RadTabStripILMain.ClientID %>').get_selectedTab().scrollIntoView();
                }






    Calling from my code behind file after selection of particular  tab from my code behind Class



        string scriptSelectedTab = "<script>clientSelectedTab();</script>";
            ScriptManager.RegisterStartupScript(this, GetType(), "selectTab", scriptSelectedTab, true);



    Please answer it as soon as possible i need this very urgent .



    thanks
    Gaurav



  4. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 23 Jun 2010 Link to this post

    Hi Gaurav,

    Please try the following server-side code:
    string scriptSelectedTab = "<script>clientSelectedTab();</script>";
    ScriptManager.RegisterStartupScript(this, GetType(), "selectTab", scriptSelectedTab, false);

    Kind regards,
    Simon
    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
Back to Top