zoukankan      html  css  js  c++  java
  • jqGrid 自定义搜索

    <div id="mysearch"></div>

    jQuery("#mysearch").filterGrid('#grid_id',options);

    options:参数

    参数

    描述

    默认值

    gridModel

    当为ture我们会使用colModel中的属性构造查询条件,所用到的参数:name, index, edittype, editoptions, search.还有一个参数:defval:查询条件的默认值;surl:当edittype:'select'时获取select数据的url,格 式:<select><option value='val1'> Value1 </option><option value='val2'> Value2 </option>…<option value='valn'> ValueN </option></select>

    false

    gridNames

    gridModel为true时起效,设置查询列的名称

    false

    filterModel

    gridModel为false时起效,格式:{label:'LableFild', name: 'colname', stype: 'select', defval: 'default_value', surl: 'someurl', sopt:{optins for the select}}。label:字段显示名称;name:列名;stype:输入框类型,text或者select;surl:获取select数据的地 址,要求的内容为html格式:<select><option value='val1'> Value1 </option><option value='val2'> Value2 </option>…<option value='valn'> ValueN </option></select>;sopt:同editoptions 

    []

    formtype

    定义表单如何被构造,'horizontal' or 'vertical'

    autosearch

    如果为true:当点击回车键触发查询;当select值变化时触发查询

    formclass

    可以使用的css

    filterform

    tableclass

    可以使用到table上的css

    filtertable

    buttonclass

    按钮上使用的css

    filterbutton

    searchButton

    搜索按钮

    Search

    clearButton

    清空数据的按钮

    Clear

    enableSearch

    启用禁用搜索按钮

    false

    enableClear

    启用禁用清空按钮

    false

    beforeSearch

    搜索之前触发的事件

    null

    afterSearch

    搜索完成之后触发的事件

    null

    beforeClear

    清空数据之前触发的事件

    null

    afterClear

    清空数据之后触发事件

    null

    url

    搜索数据的url

    ‘’

    marksearched

    当为true时,每次查询之后所有查询的列都标记为可查询列

    true

  • 相关阅读:
    MySQL学习之EXPLAIN执行计划详解及最佳实践
    MySQL学习之Mysql锁&事务隔离级别
    Mybatis学习之核心原理代码详解
    Mybatis学习之工作流程代码详解
    Mybatis学习之核心配置详解
    Mybatis学习之Mybatis Demo入门使用
    缓存穿透解决方案之布隆过滤器(Bloom Filter)原理及Guava中的实现
    Zookeeper学习之Jute序列化以及通信协议详解
    Zookeeper学习之Zab一致性协议
    Zookeeper学习之ZooKeeper源码分析
  • 原文地址:https://www.cnblogs.com/cleverJoe/p/3848845.html
Copyright © 2011-2022 走看看