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

How to lock Date-Picker Properly?

1 Answer 63 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Purushothaman
Top achievements
Rank 2
Purushothaman asked on 06 Mar 2013, 10:03 AM
Hi,

I am using DatePicker in Gridview to show the data.In this part i want to lock the calender or Date picker. So i used IsReadOnly Property.Even now i am getting one problem.
<telerikGrid:GridViewDataColumn
            Header="Testing Grid"
            Width="55"
            IsSortable="False"
            TextWrapping="NoWrap"
            IsResizable="False"
            CellStyle="{StaticResource GridViewCellStyle}"
            HeaderCellStyle="{StaticResource telerikHeaderCellStyle}">
            <telerikGrid:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                <telerikControl:RadDatePicker
                    x:Name="datePic1"
                    SelectedDate="{Binding SampleDate, Mode=TwoWay}"
                    Style="{StaticResource StyleradDatePicker}"
                    KeyDown="datePic_KeyDown"
                    KeyUp="datePic_KeyUp"
                    IsReadOnly="{Binding IsLock}" />
                    </DataTemplate>
            </telerikGrid:GridViewDataColumn.CellTemplate>
            <telerikGrid:GridViewDataColumn.CellEditTemplate>
                <DataTemplate>
                <telerikControl:RadDatePicker
                    x:Name="datePic2"
                    SelectedDate="{Binding SampleDate, Mode=TwoWay}"
                    Style="{StaticResource StyleradDatePicker}"
                    KeyDown="datePic_KeyDown"
                    KeyUp="datePic_KeyUp"
                    IsReadOnly="{Binding IsLock}" />
                </DataTemplate>
            </telerikGrid:GridViewDataColumn.CellEditTemplate>
</telerikGrid:GridViewDataColumn>

if i open that page and that time DatePicker is Read only. Now I press any Character  means it will move to another control without change.if I am doing the same more than 2 times that time my previous time was deleted.Please let me know how to handle this issues.

In  datePic_KeyUp Event,
RaiseEvent TextChanged()


1 Answer, 1 is accepted

Sort by
0
Alek
Telerik team
answered on 11 Mar 2013, 10:59 AM
Hi Purushothaman,

With the information you've provided we do not have a clear view what's going on in the application background. 

If it is possible it would be of a great help if you can isolate the scenario in a sample project and send it to us. 

Looking forward for your answer.

Greetings,
Alek
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DatePicker
Asked by
Purushothaman
Top achievements
Rank 2
Answers by
Alek
Telerik team
Share this question
or