Proper way to attach client-side onfocus event to GridDropDownColumn

2 posts, 0 answers
  1. Travis
    Travis avatar
    8 posts
    Member since:
    Aug 2011

    Posted 10 May 2016 Link to this post

    I have a question regarding the proper way to attach an onfocus client-side event so it will generate on the input tag rather than the parent div tag (because it doesn't fire on the div tag) for a GridDropDownColumn?

    I am currently attempting this in the PreRender event for the grid since I am placing every item in the grid into edit mode. But, I can't figure out how to get the onfocus to generate on the input tag containing the text for the GridDropDownColumn. Any help would be greatly appreciated.

  2. Eyup
    Eyup avatar
    4074 posts

    Posted 13 May 2016 Link to this post

    Hi Travis,

    You can access the generated RadComboBox or RadDropDownList in edit mode using the approach demonstrated in the following section:

    Then, you can attach the RadComboBox1.OnClientFocus = "focusHandlerName"; event handler and inside the javascript function focusHandlerName(sender, args){ ... } access the required element using the sender and args objects.

    I hope this will prove helpful.

    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top