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

Problem with ClientIDMode = Static

6 Answers 123 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Henrique Duarte
Top achievements
Rank 1
Veteran
Henrique Duarte asked on 24 Jan 2011, 06:13 PM
Hello,

I have two RadDatePicker on a page with property ClientIDMode of them setted to Static.
The problem is, the calendar is only openning on first RadDatePicker.
If I remove ClientIDMode, letting it be automatically generated, the page works nicelly.
Is there any way to make it work?

<telerik:RadDatePicker ID="iInicioPeriodo" ClientIDMode="Static" runat="server" Width="80" Style="margin-right: 10px;" DateFormat="dd/MM/yyyy">
</telerik:RadDatePicker>
até
<telerik:RadDatePicker ID="iTerminoPeriodo" ClientIDMode="Static" runat="server" Width="80" Style="margin-left: 10px;" DateFormat="dd/MM/yyyy">
</telerik:RadDatePicker>

Best regards,

Henrique

6 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 27 Jan 2011, 02:51 PM
Hello,

Yes, we are familiar with this issue (there are several threads about this in the forums), however this behavior is expected. Microsoft recommends using ClientIDMode=Static only for static control. RadControls on the other hand are controls with complex hierarchies of child controls and templates so setting their ClientID mode to static will break their functionality.

All the best,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
technology@trackresults.net
Top achievements
Rank 1
answered on 10 Jul 2014, 08:39 PM
This is a very lazy answer and full of misinformation and excuses.

First all you have said is the feature of setting a static id doesn't work and we know it.  Next there is no such thing as a static control, as if a TextBox was static and GridView is dynamic, you are just making up terms.  Finally Microsoft does NOT give that recommendation and clearly all their controls with templates work correctly as well as your competition component art's controls.

Please site this recommendation from Microsoft that justifies your control not working properly with a link back to Microsoft's recommendation .

Please fix your buggy non compliant with standard feature controls.

http://msdn.microsoft.com/en-us/library/system.web.ui.clientidmode(v=vs.110).aspx

"The ClientID value is set to the value of the ID property. If the control is a naming container, the control is used as the top of the hierarchy of naming containers for any controls that it contains."


0
Vasil
Telerik team
answered on 11 Jul 2014, 10:28 AM
Hello,

Thank you for the feedback. We know this is desired feature, and we will try to implement it in future. But currently it is not scheduled for implementation, and I could not give any estimation when and if it will happen.

The main problem is not the server side part of the controls, they are working with static id as well as predictable even now. However as you know all our controls are having client side object. And in the case of the RadDatePicker, the picker need to find it's Calendar, TimeView, DateInput, buttons etc. The only way that the picker to find it's correct child controls is to use predictable ID mode.

The analogy with MS Asp controls could not be done on this base, because they don't have any client side API. I hope you understand our concerns.


Regards,
Vasil
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Martin
Top achievements
Rank 1
answered on 15 May 2015, 08:46 AM

Ls,

We are now almost 1 year further down the road, and still this is not fixed, nor is there any update on when (OR IF) this will be fixed.

I'm afraid that the money we spend on your product becomes a waste, and we need to start warning others NOT to use Telerik components! Already started looking for alternatives...

Please update ASAP!

0
Martin
Top achievements
Rank 1
answered on 15 May 2015, 08:47 AM

Ls,

We are now almost 1 year further down the road, and still this is not fixed, nor is there any update on when (OR IF) this will be fixed.

I'm afraid that the money we spend on your product becomes a waste, and we need to start warning others NOT to use Telerik components! Already started looking for alternatives...

Please update ASAP!

0
Marin Bratanov
Telerik team
answered on 15 May 2015, 10:34 AM

Hello Martin,

Allowing ClientIDMode=Static is not a trivial feature. On the contrary, it is going to be very complex to add support for that with the complex, container and/or composite controls like ours. This is why our documentation states this mode is not supported: http://www.telerik.com/help/aspnet-ajax/introduction-troubleshooting.html#clientIDMode-staic-breaks-controls. If we do manage to add support for the Static mode, this will be noted in the documentation.

Usually, changing IDs can cause difficulties for accessing the client-side objects of the controls, and I can suggest two approaches that can alleviate that:

  • examine this blog post: http://blogs.telerik.com/jefffritz/posts/13-01-21/simplify-javascript-control-references-in-asp.net-webforms.
  • use the jQuery endsWith selector and the control property MS AJAX adds to the DOM object, e.g.:
    <asp:Button ID="Button1" Text="use editor" OnClientClick="useEditor(); return false;" runat="server" />
    <telerik:RadEditor ID="RadEditor1" runat="server"></telerik:RadEditor>
    <script>
        function getEditor() {
            return $telerik.$("[id$='RadEditor1']")[0].control;
        }
        function useEditor() {
            var editor = getEditor();
            if (editor) {
                alert(editor);
            }
        }
    </script>

Regards,

Marin Bratanov
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Calendar
Asked by
Henrique Duarte
Top achievements
Rank 1
Veteran
Answers by
Maria Ilieva
Telerik team
technology@trackresults.net
Top achievements
Rank 1
Vasil
Telerik team
Martin
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or