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

[Solved] problem passing parameter to rebind grid

0 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sonam
Top achievements
Rank 1
Sonam asked on 10 May 2012, 07:56 AM
Hi Everyone/Telerik Team,

I am not able to get the parameter passed through rebind grid in my actionmethod in the controller.  if the parameter is from a simple textbox, it works fine but when i am passing value from telerik dropdownlist as a parameter to my method.... my method is not able to get the parameter.
 

any idea.....please !!!!

My JQuery Code:
$(document).ready(function () {
       $("#SearchButton").click(function () {
           var year = $("#financialyear").data("tDropDownList").text();
           $("#Result").data("tGrid").rebind({ finYear: year });
 
       });
   });

My Controller Method:
[GridAction]
      public ActionResult _Search(string finYear)
      {
          //finYear = "2013-2014";
          
          if (!string.IsNullOrEmpty(finYear)) //|| (!string.IsNullOrEmpty(finYear)))
          {
                            
              return View(new GridModel
          {
              Data = GetTeam(finYear)
          });
          }
          return RedirectToAction("Search");
      }
Tags
Grid
Asked by
Sonam
Top achievements
Rank 1
Share this question
or