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

Set focus of RadDatepicker

1 Answer 87 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
sankar kanna
Top achievements
Rank 1
sankar kanna asked on 24 Aug 2009, 09:59 AM
Hi,
    I have an issue in set the focus in raddatepicker when the screen loads. this is the first control in that screen. the cursor is not focused on that particular control even though I am given the focus property also.

    I am also having issues in set the focus in rad gridview control. The tab property is working after selecting any columns in the gridview.


Code snippet:

dtpEffectiveDate.Focus();

Thanks in advance.
Sankar Kanna.S

1 Answer, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 26 Aug 2009, 08:46 AM
Hello sankar kanna,

It appears that this is a bug in the Silverlight 3 runtime as in Silverlight 2 is working as expected. To overcome this limitation you can do the following code implementation.
public SomeClass() 
        { 
            InitializeComponent(); 
 
            Dispatcher.BeginInvoke(() => 
            { 
                System.Windows.Browser.HtmlPage.Plugin.Focus(); 
 
                var isFocused = radDatePicker.Focus(); 
            }); 
        } 


Kind regards,
Kaloyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Calendar
Asked by
sankar kanna
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Share this question
or