Setting focus on a CoverFlow template item

7 posts, 0 answers
  1. Darren Stoppler
    Darren Stoppler avatar
    36 posts
    Member since:
    Apr 2010

    Posted 12 Oct 2010 Link to this post

    How would you set focus to a textbox that is present in a CoverFlow selected item?

    Thank you.
  2. George
    Admin
    George avatar
    1332 posts

    Posted 18 Oct 2010 Link to this post

    Hello Darren,

    I would suggest you to get the SelectedItem of the RadCoverFlow control. Then, you could find the textbox, placed in the item template using ChildrenOfType<TextBox>, and set the Focus on the textbox. 

    I hope this helps.

    Sincerely yours,
    George
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Darren Stoppler
    Darren Stoppler avatar
    36 posts
    Member since:
    Apr 2010

    Posted 19 Oct 2010 Link to this post

    Thanks George
  5. Darren Stoppler
    Darren Stoppler avatar
    36 posts
    Member since:
    Apr 2010

    Posted 20 Oct 2010 Link to this post

    Hi George,

    I can only get reference to the coverflow data object rather than the template.  How would I access the actual item template through the selected item?

    Thanks
  6. George
    Admin
    George avatar
    1332 posts

    Posted 26 Oct 2010 Link to this post

    Hello Darren,

    Sorry for this misunderstanding. Unfortunately, setting the focus to the TextBox is not as easy as I thought .

    I would suggest you to add an Id (or Index) property of your ViewModel. Also, you could add an attached property to the textbox and bind it to the SelectedIndex of the RadCoverFlow. Then, you could check whether the Id is equal to the SelectedIndex or not, in order to set focus to the textbox.

    Attached you can find the sample. I hope this helps. Please do not hesitate to contact us if you require any further information.

    Sincerely yours,
    George
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Darren Stoppler
    Darren Stoppler avatar
    36 posts
    Member since:
    Apr 2010

    Posted 04 Nov 2010 Link to this post

    Thanks George
  8. Pavan
    Pavan avatar
    1 posts
    Member since:
    Jan 2012

    Posted 20 Jan 2012 Link to this post

    hi,

      Thanks very much for giving such excellenct example for rad cov er flow, i helped link from you is http://www.telerik.com/community/forums/silverlight/coverflow/setting-focus-on-a-coverflow-template-item.aspx
    with this i can able to archive the task, but for setting the textbox focus the first cover page on load, i am facing problems . kindly help me with the code how to show focus for text box on load ok  the cover index. 

    thanks in advanced 

Back to Top
DevCraft banner