Proper way to attach client-side onfocus event to GridDropDownColumn

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

    Posted 10 May 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
    Admin
    Eyup avatar
    3015 posts

    Posted 13 May 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:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/accessing-cells-and-rows#accessing-controls-in-editinsert-mode

    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.

    Regards,
    Eyup
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top