KendoUI

[ITSkeleton] KendoUI Grid - Read 사용하기

ITSkeleton 2017. 6. 16. 16:59
728x90
반응형


.Read(read => read.Action("ViewPage","Controller", new { parameta = 1, parametastring = "sample"}))


가장 일반적으로 쓰이는 방법입니다.


하지만 단점으로는 동적인 값을 파라미터값에 집어넣을수 없다는게 큰 단점인데요.


이걸 해결하기 위한 방법이 또 존재합니다.


.Read(read => read.Action("ViewPage","Controller").Data("functionName"))


<script>

var sample1 = 1;

var sample2 = "Hello";

function functionName(){

return{

parameta: sample1,

parametastring: sample2,

};

}

</script>


이런 방법을 사용할수 있습니다


위의 파라미터 이름은 컨트롤러의 ActionResult 함수의 파라미터 이름과 일치해야 합니다.

728x90
반응형