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

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

3 Answers 65 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Gaurav
Top achievements
Rank 1
Gaurav asked on 22 Jun 2010, 02:14 PM
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





3 Answers, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 22 Jun 2010, 03:01 PM
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
0
Gaurav
Top achievements
Rank 1
answered on 23 Jun 2010, 10:10 AM
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



0
Simon
Telerik team
answered on 23 Jun 2010, 02:26 PM
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
Tags
TabStrip
Asked by
Gaurav
Top achievements
Rank 1
Answers by
Yana
Telerik team
Gaurav
Top achievements
Rank 1
Simon
Telerik team
Share this question
or