How to lock Date-Picker Properly?

2 posts, 0 answers
  1. Purushothaman
    Purushothaman avatar
    23 posts
    Member since:
    Jul 2011

    Posted 06 Mar 2013 Link to this post

    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()


  2. Alek
    Admin
    Alek avatar
    78 posts

    Posted 11 Mar 2013 Link to this post

    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.

  3. DevCraft banner
Back to Top