2014-12-22 3 views
0

내 응용 프로그램에서 사용할 검도 - 드롭 다운 상자를 가지고, 나는 상자이 드롭 다운에서 검색 가능한 기능을 추가하고 싶지만 .. 그래서 어떤 budy 저를 도와주세요 .. 작동하지 않는검도 드롭 다운 검색 기능

@(Html.Kendo().DropDownList() 
    .Name("PCODE") 
    .OptionLabel("--Select--") 
    .HtmlAttributes(new { style = "width:100%;" }) 
    .DataTextField("PCODE") 
    .DataValueField("EmpId") 
    .HtmlAttributes(new { @class = "kendo-Drop-PCode" }) 
    .Filter("contain") 
    .DataSource(source => 
    { 
     source.Read(read => 
     { 
      read.Action("GetEmployeeList", "Common"); 
     }) 
     .ServerFiltering(true); 
    } 
    ) 
) 

답변

1

몇 가지 내가 포착 한 :

1) .Filter이

2) 서버를 수행하려는 경우) "포함"()보다는 필터 .Filter는 ("포함"말할 필요 필터링 당신은 입력 된 텍스트의 값을 서버에 되돌려 보내야하고 req의 일부로 처리해야합니다. 예 :

public JsonResult GetEmployeeList(string filterValue = "") 
{ 
    do something in here.... 
} 
: 컨트롤러에서

source.Read(read => 
     { 
      read.Action("GetEmployeeList", "Common").Data("GetFilterValue") 
     }) 


function GetFilterValue() 
{ 
    return {filterValue: $("#PCODE").data("kendoDropDownList").filterInput.val() }; 
} 

다음 입력 값을 받아 서명을 수정

관련 문제