$("#btnSearch2").kendoButton({
icon: "search",
click: function(e) {
var searchGwamok = $("#searchGwamok").val();
searchGwamok = searchGwamok.replace(/ +/g, "");//공백제거
if(searchGwamok == null || searchGwamok == '' || typeof searchGwamok == 'undefined'){
$("#gridList").data("kendoGrid").setDataSource(newDataSource);
alert("검색할 입력해주세요.");
}else{
$("#gridList").data("kendoGrid").setDataSource(dataSourceGwamok);
}
$("#gridList").data("kendoGrid").dataSource.read();
}
});
/*DataSource 초기화 */
var newDataSource = new kendo.data.DataSource({
data: []
});
<%-- dataSource --%>
var dataSourceGwamok = new kendo.data.DataSource({
transport: {
read: function(options){
$("#gridList").kendoGrid({
dataSource: newDataSource,
$("#grid2").data("kendoGrid").setDataSource(dataSourcePreview);
$("#grid2").getKendoGrid().saveAsExcel();