Hi,
I have a RadGrid in a RadWindow that has a couple of time entries in it.
I have a form template with 2 RadTimePiickers on it to enter/edit data & everything is going fine.
However, the RadTimeView is opening in the bottom left of the windo and some of the times are getting cut off by the modal window edge.
What I would like to do is similar to the help file on positioning the time view. The example shows how to do this from a keypress (ie have an OnKeyPress client event in the TimePicker while the button is rendered invisible) but there is nothing to say how to do it from the button press. I was thinking of adding my own button & adding the javascript but how do I get the Telerik button image.
I have found a really good article on finding a control in a form template Access FormTemplate controls from javascript when using UpdatePanel by Ruth Dahan but still having problem with the actual positioning code.
The pickerStartClientID and pickerEndClientID were provided by Ruth's code but all the javascript does is loop. I tried using a eventArgs.set_cancel(true); in both showStartTimePopUp and showEndTimePopUp but this did nothing.
Any ideas?
Regards
Roger
I have a RadGrid in a RadWindow that has a couple of time entries in it.
I have a form template with 2 RadTimePiickers on it to enter/edit data & everything is going fine.
However, the RadTimeView is opening in the bottom left of the windo and some of the times are getting cut off by the modal window edge.
What I would like to do is similar to the help file on positioning the time view. The example shows how to do this from a keypress (ie have an OnKeyPress client event in the TimePicker while the button is rendered invisible) but there is nothing to say how to do it from the button press. I was thinking of adding my own button & adding the javascript but how do I get the Telerik button image.
I have found a really good article on finding a control in a form template Access FormTemplate controls from javascript when using UpdatePanel by Ruth Dahan but still having problem with the actual positioning code.
function showStartTimePopUp(sender, eventArgs) { |
var picker = $find(pickerStartClientID); |
showTimePopUp(picker, eventArgs); |
} |
function showEndTimePopUp(sender, eventArgs) { |
var picker = $find(pickerEndClientID); |
showTimePopUp(picker, eventArgs); |
} |
function showTimePopUp(picker, eventArgs) { |
var popup = eventArgs.get_popupControl(); |
var textBox = picker.get_textBox(); |
var popupElement = picker.get_timePopupContainer(); |
var dimensions = picker.getElementDimensions(popupElement); |
var position = picker.getElementPosition(textBox); |
picker.showTimePopup(position.x, position.y - dimensions.height); |
} |
The pickerStartClientID and pickerEndClientID were provided by Ruth's code but all the javascript does is loop. I tried using a eventArgs.set_cancel(true); in both showStartTimePopUp and showEndTimePopUp but this did nothing.
Any ideas?
Regards
Roger