I have a timeview that needs to show times for about 12 hours in 5 minute intervals. When using the Web20 skin, the timeview appears too large and may not display properly depending on the user's screen resolution.
Is there a way to get the timeview popup to scroll and maintain a constant height/width. Using the height/width properties doesn't appear to make a difference.
Thanks.
Is there a way to get the timeview popup to scroll and maintain a constant height/width. Using the height/width properties doesn't appear to make a difference.
Thanks.
8 Answers, 1 is accepted
0
Hello AK,
Here is how to do it:
Let us know if you need further advice.
Regards,
Dimo
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Here is how to do it:
<head runat="server"> |
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
<style type="text/css"> |
#<%= RadTimePicker1.ClientID %>_timeView_wrapper |
{ |
overflow:auto; |
width:100px; |
height:100px; |
} |
</style> |
</telerik:RadCodeBlock> |
</head> |
<body> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server" /> |
<telerik:RadTimePicker ID="RadTimePicker1" runat="server" /> |
</form> |
</body> |
Let us know if you need further advice.
Regards,
Dimo
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
AK
Top achievements
Rank 1
answered on 08 Jul 2008, 03:29 PM
Worked like a charm. Perfect!
Thanks!
Thanks!
0
AK
Top achievements
Rank 1
answered on 09 Jul 2008, 12:33 AM
One more request.
How can I accomplish the same thing if the timepicker is in an edit form of a RadGrid?
Thanks.
How can I accomplish the same thing if the timepicker is in an edit form of a RadGrid?
Thanks.
0
Hello Andrew,
I suggest you to use similar approach as shown below:
Regards,
Daniel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I suggest you to use similar approach as shown below:
function radTimePicker1_load(sender, eventArgs) |
{ |
var wrapperID = sender._clientID.replace(/_dateInput/, "_timeView_wrapper"); |
var elem = document.getElementById(wrapperID); |
elem.style.overflow = "auto"; |
elem.style.width = "100px"; |
elem.style.height = "100px"; |
} |
Regards,
Daniel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
AK
Top achievements
Rank 1
answered on 12 Jul 2008, 12:46 AM
Thanks for the suggestion. I can't seem to get this line to pick up the client ID:
var wrapperID = sender._clientID.replace(/_dateInput/, "_timeView_wrapper");
Is their an event to wire the script to or something else I need to modify to match the ids of my grid or timepicker?
Thanks.
0
Hello Andrew,
Basically this is the only possible way (excluding the use of attributes, which is non-XHTML compliant) to get the timeView wrapper. It cannot be accessed directly, nor you can modify its style at the beginning because the element is created after the control creation.
Kind Regards,
Daniel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Basically this is the only possible way (excluding the use of attributes, which is non-XHTML compliant) to get the timeView wrapper. It cannot be accessed directly, nor you can modify its style at the beginning because the element is created after the control creation.
Kind Regards,
Daniel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Tony
Top achievements
Rank 2
answered on 26 Sep 2008, 09:59 PM
Does this also work with RadDateTimePicker ?
0
Hi Developer,
The same logic should be applicable for the RadDateTimePicker control as well. Another technique to access server controls in grid template on the client is demonstrated in the sample project from this code library thread.
Best regards,
Stephen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
The same logic should be applicable for the RadDateTimePicker control as well. Another technique to access server controls in grid template on the client is demonstrated in the sample project from this code library thread.
Best regards,
Stephen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.