8 Answers, 1 is accepted
0
Hello jsearl,
The Expand-/Collapse- Animation properties cannot be set globally via a Skin file.
Please try using another approach - add a Key in the <appSettings> section of the web.config and specify the Animation Type and Duration there.
Inherit from the RadComboBox control, override its OnPreRender method and set the corresponding properties as specified in the web.config.
Alternatively you could create a base page (and inherit other pages from it) which would do the same in its OnPreRender method.
Sincerely yours,
Simon
the Telerik team
Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
Sincerely yours,
Simon
the Telerik team
Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Tobias
Top achievements
Rank 1
answered on 13 Dec 2009, 02:29 PM
Hi,
can you probably give an example for the <appSettings> section of the web.config
to control the expand and collapse animazion of all comboboxes in the application?
Thanks a lot,
Tobi
can you probably give an example for the <appSettings> section of the web.config
to control the expand and collapse animazion of all comboboxes in the application?
Thanks a lot,
Tobi
0
Hello Tobias,
you could then use these values to set the ExpandAnimation properties (advisably in the Page_PreRender event handler):
I hope this is helpful.
Regards,
Simon
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Yes, here is an example: provided that you have added the following to the AppSettings section of your web.config file:
<appSettings> <add key="RCBExpandAnimationType" value="InExpo" /> <add key="RCBExpandAnimationDuration" value="2000" /></appSettings>protected void Page_PreRender(object sender, EventArgs e){ RadComboBox1.ExpandAnimation.Type = (AnimationType) Enum.Parse(typeof(AnimationType), ConfigurationManager.AppSettings["RCBExpandAnimationType"]); RadComboBox1.ExpandAnimation.Duration = int.Parse(ConfigurationManager.AppSettings["RCBExpandAnimationDuration"]);}Regards,
Simon
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Tobias
Top achievements
Rank 1
answered on 14 Dec 2009, 11:05 AM
Thanks for your replay, Simon.
When I understand that correct, there isn't a possibility to define the animation of all my Comboboxes once and not to have to set collapse-, expandanimation... for each combo on every site?
When I understand that correct, there isn't a possibility to define the animation of all my Comboboxes once and not to have to set collapse-, expandanimation... for each combo on every site?
0
Hi Tobias,
Indeed, using this approach you still need to write the code in each page using a RadComboBox.
Another approach requiring less code and is easier to implement is to inherit from RCB and set the Expand/Collapse Animation properties in the PreRender method override as opposed to doing so in the Page_PreRender on each page.
Still you will need to update the references of all RCBs across you project to use the inherited version of the control.
Sincerely yours,
Simon
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Sincerely yours,
Simon
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Tobias
Top achievements
Rank 1
answered on 14 Dec 2009, 11:24 AM
OK, thanks.
This just could be a feature request to set a property once in web.config.
(My customer don't like the animations. He wants all RCBs to open and close with animation set to "None")
This just could be a feature request to set a property once in web.config.
(My customer don't like the animations. He wants all RCBs to open and close with animation set to "None")
0
Hello Tobias,
Actually there is another approach which requires even less setup and code - Themes.
You could define a default Theme which will set the [Expand/Collapse]Animation- Type/Duration properties to RadComboBox so that they apply to all of your pages.
Here is an example of a simple Theme doing just as described above:
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %><telerik:RadComboBox runat="server" ExpandAnimation-Type="None" ExpandAnimation-Duration="0" CollapseAnimation-Type="None" CollapseAnimation-Duration="0" />I hope this helps.
All the best,
Simon
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Tobias
Top achievements
Rank 1
answered on 14 Dec 2009, 03:54 PM
Hello Simon,
that did it! This was exactly what I needed.
Thank you very much. I like telerik support.
You are all doing a great job.
Thanks
that did it! This was exactly what I needed.
Thank you very much. I like telerik support.
You are all doing a great job.
Thanks