function BataSearchPageTemplate() {

    var fileName = $("#txtlikeFileName").val();
    var templateName = $("#txtlikeTemplateName").val();
    var templateType = $("#slctlikeTempleteType option:selected").val();

    $('#pgTemp').datagrid({
        title: "模板列表",
        height: 550,
        nowrap: true, //设置为true,当数据长度超出列宽时将会自动截取。
        striped: true, //隔行变色
        collapsible: false,   //是否可折叠的,           
        idField: 'TemplateId',
        pageSize: 2, //每页显示的记录条数,默认为10 
        pageNumber: 1,
        pagination: true, //设置true将在数据表格底部显示分页工具栏   
        rownumbers: false, //行号  
        collapsible: false,
        border: false, //显示面板的边界
        singleSelect: true, //是否单选  
        pageList: [5, 10, 15], //可以设置每页记录条数的列表 
        showPageList: false,
        url: '/AjaxPageTemplate/SearchPageTemplate.cspx?templateType=' + templateType + '&fileName=' + encodeURIComponent(fileName) + '&templateName=' + encodeURIComponent(templateName),
        columns: [[
             { title: "模板名称", field: "TemplateName", width: 150 },
			 { title: "文件名称", field: "TemplateFileName", width: 150 },
              { title: "路径", field: "HtmlPath", width: 200 },
             { title: "简介", field: "Remark", width: 450 },
			 { title: "排序号", field: "OrderNum", width: 50 },
             { title: "栏目属性", field: "TempleteType", width: 50,
                 formatter: function (value, row) {
                     return value == 2 ? "<a rowtid='" + row.TemplateId + "'rowtype='" + row.TempleteType + "' href='javascript:void(0);'class='easyui-linkbutton' plain='true'>所属</a>" : "<a rowtid='" + row.TemplateId + "'rowtype='" + row.TempleteType + "' href='javascript:void(0);' class='easyui-linkbutton' plain='true'>涉及</a>";
                 }

             },
             { title: "状态", field: "Status", width: 50,
                 formatter: function (value, row) {
                     return value == true ? "开启" : "停用";
                 }
             },
              { title: "预览", field: "xx1", width: 80,
                  formatter: function (value, row) {
                      return row.TempleteType == 1 ? '<a href="../preview.aspx?TemplateId=' + row.TemplateId + '"  class="easyui-linkbutton" plain="true" target="_blank">预览</a>' : "原文";
                  }
              },
             { title: "操作", field: "xx2", width: 80,
                 formatter: function (value, row) {
                     var productButtonHtml = row.TempleteType == 1 ? '<a href="javascript:void(0);"  class="easyui-linkbutton" itemId="' + row.TemplateId + '" plain="true">生成</a>/' : '';
                     return productButtonHtml + '<a href="javascript:void(0);" class="easyui-linkbutton" rowId="' + row.TemplateId + '" plain="true">编辑</a>  ';

                 }
             },
              { title: "删除", field: "xx3", width: 50,
                  formatter: function (value, row) {
                      return '<a  href="javascript:void(0);" class="easyui-linkbutton" linkurl="/AjaxPageTemplate/DeletePageTemplate.cspx?templateId=' + row.TemplateId + '" title="删除"  plain="true">删除</a>';
                  }
              }
		    ]],
        onLoadSuccess: function () {
            $($('#pgTemp').datagrid("getPanel")).find('a.easyui-linkbutton')
                 .filter(g_deleteButtonFilter).click(deleteTemplate).end()
                 .filter("a[rowtid]").click(windsopen).end()
                 .filter("a[rowId]").click(ShowPageTemplate).end()
                 .filter("a[itemId]").click(productTemplateHtml);
        }
    });
}