Hi,
How to hide the Close Button part?
And what is the event to capture the click event on time?
I want to close the selection of time after selecting time.
Thanks.
How to hide the Close Button part?
And what is the event to capture the click event on time?
I want to close the selection of time after selecting time.
Thanks.
4 Answers, 1 is accepted
0
Hi Saif,
Thank you for writing.
To hide the footer you can set the respective element's Visibility property:
To handle the click on the hours visual element, you can use the following snippet:
I hope that you find this information useful.
Regards,
Stefan
Telerik
Thank you for writing.
To hide the footer you can set the respective element's Visibility property:
radTimePicker1.TimePickerElement.PopupContentElement.FooterPanel.Visibility = ElementVisibility.Collapsed;
To handle the click on the hours visual element, you can use the following snippet:
radTimePicker1.TimePickerElement.PopupForm.MouseDown += radTimePicker1_MouseDown;
…..
void
radTimePicker1_MouseDown(
object
sender, MouseEventArgs e)
{
TimeTableVisualElement clickedElement = radTimePicker1.TimePickerElement.PopupContentElement.ElementTree.GetElementAtPoint(e.Location)
as
TimeTableVisualElement;
if
(clickedElement !=
null
)
{
if
(clickedElement.FindAncestor<TimeTableElementHours>() !=
null
)
{
//you have clicked hour element
}
}
}
I hope that you find this information useful.
Regards,
Stefan
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Saif
Top achievements
Rank 2
answered on 26 Jun 2014, 11:41 AM
Hi Stefan,
Thanks a lot.
Thanks a lot.
0
Saif
Top achievements
Rank 2
answered on 09 Aug 2014, 06:52 AM
Hi again..
How can i apply above code in GridView?
Thanks
How can i apply above code in GridView?
GridViewDateTimeColumn timecolumn =
new
GridViewDateTimeColumn();
timecolumn.EditorType = GridViewDateTimeEditorType.TimePicker;
Thanks
0
Hello Saif,
To access the time editor in RadGridView you should use the CellEditorInitialized event:
Off topic, may I please ask you to separate the questions that are not related to each other in separate threads, in order to make it easier to search in the forums.
Thank you for the understanding. I hope that you find the provided information useful.
Regards,
Stefan
Telerik
To access the time editor in RadGridView you should use the CellEditorInitialized event:
void
radGridView1_CellEditorInitialized(
object
sender, GridViewCellEventArgs e)
{
GridTimePickerEditor timeEditor = e.ActiveEditor
as
GridTimePickerEditor;
if
(timeEditor !=
null
)
{
RadTimePickerElement timeElement = (RadTimePickerElement )timeEditor.EditorElement;
timeElement.PopupContentElement.FooterPanel.Visibility = ElementVisibility.Collapsed;
timeElement.PopupForm.MouseDown -= radTimePicker1_MouseDown;
timeElement.PopupForm.MouseDown += radTimePicker1_MouseDown;
}
}
void
radTimePicker1_MouseDown(
object
sender, MouseEventArgs e)
{
RadTimePickerPopup popup = (RadTimePickerPopup)sender;
TimeTableVisualElement clickedElement = popup.ContentElement.ElementTree.GetElementAtPoint(e.Location)
as
TimeTableVisualElement;
if
(clickedElement !=
null
)
{
if
(clickedElement.FindAncestor<TimeTableElementHours>() !=
null
)
{
//you have clicked hour element
}
}
}
Off topic, may I please ask you to separate the questions that are not related to each other in separate threads, in order to make it easier to search in the forums.
Thank you for the understanding. I hope that you find the provided information useful.
Regards,
Stefan
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.