forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jqgrid.d.ts
64 lines (57 loc) · 1.56 KB
/
jqgrid.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Type definitions for jQuery jqgrid Plugin 1.3
// Project: https://github.com/tonytomov/jqGrid
// Definitions by: Lokesh Peta <https://github.com/lokeshpeta/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="../jquery/jquery.d.ts" />
interface JQueryJqGridColumn {
name: string;
index: string;
hidden?: boolean;
sortable?: boolean;
search?: boolean;
width?: number;
formatter?: (cellvalue: any, options: any, rowObject: any) => any;
}
interface IJqGridJsonReader {
repeatitems: boolean;
root(obj: any): any;
page(obj: any): any;
total(obj: any): number;
records(obj: {data: any[]}): number;
}
interface JQueryJqGridOptions {
datatype?: string;
mtype?: string;
autoencode?: boolean;
pager?: string;
rowNum?: number;
rowList?: number[];
colNames?: string[];
colModel?: JQueryJqGridColumn[];
sortname?: string;
sortorder?: string;
multiselect?: boolean;
multiboxonly?: boolean;
forceFit?: boolean;
height?: number;
width?: number;
shrinkToFit?: boolean;
url?: string;
jsonReader?: IJqGridJsonReader;
gridComplete?:()=>void;
}
interface JQueryJqGridStatic {
(): JQuery;
(gridName: string): any;
(gridName: string, propName: string): any;
(gridName: string, obj: any): any;
(gridName: string, id: any, colname: any): any;
(options: JQueryJqGridOptions): JQuery;
}
interface JQueryStatic {
jqGrid?: JQueryJqGridStatic;
}
interface JQuery {
jqGrid?: JQueryJqGridStatic;
setGridParam(obj: any): void;
}