This is a migrated thread and some comments may be shown as answers.

Manipulating filter menu and textbox - client side

1 Answer 98 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Barbaros Saglamtimur
Top achievements
Rank 1
Barbaros Saglamtimur asked on 20 Feb 2009, 01:05 AM
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) {
                            args.set_cancel(true);
                            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

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 24 Feb 2009, 07:47 AM
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,
Yavor
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.
Tags
Grid
Asked by
Barbaros Saglamtimur
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or