Manipulating filter menu and textbox - client side

2 posts, 0 answers
  1. Barbaros Saglamtimur
    Barbaros Saglamtimur avatar
    110 posts
    Member since:
    Jul 2012

    Posted 19 Feb 2009 Link to this post

    I'm playing radgrid with client side data binding and client side history management. I can successfully add, retrieve filter expressions from history point and bind data to radgrid from client side. What I would like to do is, filling filter textboxes with retrieved values from history point, and make menu highlighted with filterexpressions. Here is my sample code:

    function RadGrid1_Command(sender, args) {
                                var command = args.get_commandName();
                                var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
                                var filterExpressions = tableView.get_filterExpressions();
                                var dyanmicLinqQuery = filterExpressions.toDynamicLinq();
                                PageMethods.GetData(dyanmicLinqQuery , updateGrid, callFailed);
                                if (command == "Filter") {
                                    var State = { fex: dyanmicLinqQuery }
                                    Sys.Application.addHistoryPoint(State, "Filter : " + dyanmicLinqQuery);

    function onStateChanged(sender, e) {
                                var filterex = e.get_state().fex || '';
                                PageMethods.GetData(filterex , updateGrid, callFailed);
    Thanks in advance
  2. Yavor
    Yavor avatar
    11 posts

    Posted 24 Feb 2009 Link to this post

    Hello barbaros,

    In this case, you can get a reference to the filter textbox, by using its clientID, to set its value, and also use the OnFilterMenuShowing client side handler, to get a reference to the menu.
    I hope these suggestions help.

    Best wishes,
    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top