set cursor focus to radgrid default filter

2 posts, 0 answers
  1. Prasenjit
    Prasenjit avatar
    5 posts
    Member since:
    Nov 2013

    Posted 24 Jan 2014 Link to this post

    i'm using radgrid with default radfilter, when i filter in a column after postback the cursor focus moved away. how to set the cursor focus in currently filtered column after postback? please provide code snippet.
  2. Viktor Tachev
    Viktor Tachev avatar
    2291 posts

    Posted 28 Jan 2014 Link to this post


    In order to set focus to the filtering TextBox after postback you could use an approach similar to the one illustrated in this code library. Make sure to get the version that target the AJAX controls.

    Note that in the code library the focus is set for the TextBox in the next column. You would need to modify that code so it fits your requirements. The ItemCommand event of RadGrid could be handled in order to save the name of the currently filtered column. After this in the PreRender event handler the TextBox control for that column is focused.

    Viktor Tachev
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top