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

fireCommand error on filtering

4 Answers 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dmitry
Top achievements
Rank 1
Dmitry asked on 23 Aug 2011, 01:32 PM
Hello,
Can you please tell me how do I exactly call fireCommand on filtering? According to this help page I have to pass 4 parameters, like
fireCommand("Filter", colName, expression, function).
According to some pretty old forum post, I have to pass 2 parameters, like
fireCommand("Filter", colName + "|" + expression + "|" +  function)
I tried everything but I always get Index out of bounds error. Page_Load event fires correctly  but it never comes into ItemCommand event.
Calling mastertableview.filter() function will not fire postback. So what should I do to initiate filtering from client side?

4 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 23 Aug 2011, 01:46 PM
Hello,

Please check below link for fire itemcommand event excursively.

http://www.telerik.com/help/aspnet-ajax/grid-fire-command-event-from-code.html

Thanks,
Jayesh Goyani
0
Princy
Top achievements
Rank 1
answered on 23 Aug 2011, 01:48 PM
Hello Dmitry,

Here is the javascript that I tried which fired ItemCommand as expected.
Javascript:
function FirePageCommand()
 {
   var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
   masterTable.fireCommand("Filter", "EmployeeID", 5, Telerik.Web.UI.GridFilterFunction.LessThan)
 }

Also check the following demo which implements filtering from client side.
Grid / Declarative Binding.

Thanks,
Princy.
0
Dmitry
Top achievements
Rank 1
answered on 23 Aug 2011, 02:41 PM
Hello,
Thank you for reply but I have already used code you provided. I created a support ticket with solution attached. Can you please look at it and say what's wrong?
Thank you
0
Dmitry
Top achievements
Rank 1
answered on 24 Aug 2011, 09:27 AM
Hello Princy,
Sorry, I was thinking you were from Telerik :) I cannot attach a solution here so the only hope is that someone from Telerik will come and help.
Tags
Grid
Asked by
Dmitry
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Princy
Top achievements
Rank 1
Dmitry
Top achievements
Rank 1
Share this question
or