jqgrid

jqGrid api 中文说明

寵の児 提交于 2020-01-13 12:56:33
JQGrid是一个在jquery基础上做的一个表格控件,以ajax的方式和服务器端通信。 JQGrid Demo 是一个在线的演示项目。在这里,可以知道jqgrid可以做什么事情。 下面是转自其他人blog的一个学习资料,与其说是学习资料,说成查询帮助文档更加合适。 jqGrid学习之 ------------- 安装 jqGrid安装很简单,只需把相应的css、js文件加入到页面中即可。 按照官网文档: /myproject/css/ ui.jqgrid.css /ui-lightness/ /images/ jquery-ui-1.7.2.custom.css /myproject/js/ /i18n/ grid.locale-bg.js list of all language files …. Changes.txt jquery-1.3.2.min.js jquery.jqGrid.min.js 在页面中写法: Java 代码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en

Selected row background color

会有一股神秘感。 提交于 2020-01-13 08:33:26
问题 I'm using jqgrid with jquery-ui 'smoothness' theme, unfortunately with this theme the selected row background color is too light, I'm trying to change the background color to make it more visible. I've tried changing ui-state-highlight in css (with !important override) but this does not work. Is there a CSS way to do this or perhaps a jqgrid custom formatter is the way to go? 回答1: The class ui-state-highlight uses the background CSS attribute. So a small trick is to use background instead of

Selected row background color

拥有回忆 提交于 2020-01-13 08:33:05
问题 I'm using jqgrid with jquery-ui 'smoothness' theme, unfortunately with this theme the selected row background color is too light, I'm trying to change the background color to make it more visible. I've tried changing ui-state-highlight in css (with !important override) but this does not work. Is there a CSS way to do this or perhaps a jqgrid custom formatter is the way to go? 回答1: The class ui-state-highlight uses the background CSS attribute. So a small trick is to use background instead of

jqGrid Row Object in onSelectRow

痴心易碎 提交于 2020-01-13 08:28:08
问题 How do I get row object on row selected in jqGrid? I need the actual object, not the cellvalue. I have gone through the documentation but could not find a method that will give me the row object. since I use custom formatters, the cellValue will not work. 回答1: If you implement custom formatter and want to get the cell value with respect of getCell or getRowData you have to implement unformat function also. It is not clear what you mean under "I need the actual object, not the cellvalue". It

jqgrid属性以及事件

Deadly 提交于 2020-01-13 04:36:58
转载 1、属性 参数名称 类型 描述 默认值 是否可以被修改 ajaxGridOptions object 对ajax参数进行全局设置,可以覆盖ajax事件:error,complete 和 beforeSend 空值 是 ajaxGridOptions object 对ajax参数进行全局设置 空值 是 ajaxSelectOptions object 对ajax的select参数进行全局设置,设置editoptions跟searchoptions 参数的select属性值 空值 是 altclass String 用于表格行交替变色的class属性。你可以定义自己的class来替代默认值。只有当altRows属性设置为true时,该属性才起作用 ui-priority-secondary 是,但需要重新加载 altRows boolean 设置表格是否允许行交替变色值 false 是,需重新加载 autoencode boolean 当为 ture 时对url进行编码 false 是 autowidth boolean 如果为ture时,则当表格在首次被创建时会根据父元素比例重新调整表格宽度。如果父元素宽度改变,为了使表格宽度能够自动调整则需要实现函数:setGridWidth false 否 caption String 定义表格名称 空值 否,但是可以用api修改

Make jqGrid multiselect selection persist following pagination, toolbar search, or filter

*爱你&永不变心* 提交于 2020-01-13 02:45:10
问题 I have this jqGrid. The following is my desired behavior: The selected item will have the selection persist (and be rendered as such to the user) after changing pages or doing a search (toolbar or filter) When the select all button is selected, if no items on the current page are selected, it selects them all. If there is an item already selected, it will clear the entire list, whether on the page or not. When the Invoice Print button is clicked, it will either use the list of IDs that has

how to implement custom grouping in jqGrid

≯℡__Kan透↙ 提交于 2020-01-12 06:15:43
问题 I'm starter in jqGrid, i write this code for Implement Grouping $(function () { var mydata = [ { id: "11", invdate: "2007-10-01", name: "test", note: "note", amount: "200.00", tax: "10.00", total: "210.00" }, { id: "12", invdate: "2007-10-02", name: "test2", note: "note2", amount: "300.00", tax: "20.00", total: "320.00" }, { id: "13", invdate: "2007-09-01", name: "test3", note: "note3", amount: "400.00", tax: "30.00", total: "430.00" }, { id: "14", invdate: "2007-10-04", name: "test", note:

Jqgrid入门-Jqgrid格式化数据(九)

白昼怎懂夜的黑 提交于 2020-01-11 23:29:58
上一章已经说明了在Jqgrid中如何对数据分组,这一章主要探讨如何格式化Jqgrid中的数据。何谓格式化呢?举个例子,比如对时间格式化处理,去掉后面的时分秒;对数字进行处理,加上千分位分隔符,小数的保留位数,加上前缀或后缀。对超链接或邮箱等等。 jqGrid中对列表cell属性格式化设置主要通过colModel中formatter、formatoptions来设置的。jqGrid中也预定义了常见的格式及其options属性。 formatter formatoptions integer thousandsSeparator://千分位分隔符, 如”,” defaulValue://默认值 currency decimalSeparator: //小数分隔符,如”.” thousandsSeparator: //千分位分隔符,如”,” decimalPlaces: //小数保留位数 defaulValue: prefix://前缀,如加上”$” suffix://后缀 number decimalSeparator: //小数分隔符,如”.” thousandsSeparator: //千分位分隔符,如”,” decimalPlaces: //小数保留位数 defaulValue: date srcformat, //原来的格式 newformat //新格式 select

add extra parameter in edit url using form dialog

主宰稳场 提交于 2020-01-11 13:43:54
问题 I have create a gird uing jqgrid and in that i am using form dialog to add , edit and delete record. but in Edit Record i want to pass the id of a record along with the url even though form data will contain that , as i am using RESTful url so to update a record i have to pass the respective ID. as follow www.example.com/eventInfo/10 , Method is PUT so far i have tried jQuery("#eventGrid").jqGrid('navGrid','#pager', {}, //options { height:280, reloadAfterSubmit:false , // How can i add Event

How to load a subgrid statically?

早过忘川 提交于 2020-01-11 13:09:20
问题 I don't want use ajax to load data in my grid. Theres a way to load all data to main grid and subgrids statically? In the samples from jqGrid Documentation, the parameter subGridUrl , is needed. But I want something like: var mydata = [ { // ... some static code for data creation here } ] and using mydata in parameter data , but subGrid don't have this parameter or something else. 回答1: If you use subgrid as grid you have to create new grid inside of subGridRowExpanded callback. The callback