0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

jsGridでよく使うページ操作の一覧

0
Posted at

はじめに

よく使ったページ操作の一覧をまとめました。

現在のページインデックスを取得

// 現在のページインデックスを取得
var pageIndex = $("#grid").jsGrid("option", "pageIndex");

特定のページを開く

指定したインデックスのページを開きます。
pageIndexは、開くページの1から始まるインデックスです。値は1~総ページ数の範囲である必要があります。

// 最後のページを開く
// pageCountにはデフォルトでページ総数が入ります
$("#jsGrid").jsGrid("openPage", "pageCount");

グリッドのフィルタリング

グリッドをフィルタリングして、該当のデータがあれば特定の処理を実施できる。
今回は、グリッドをフィールド「名前」を「Otto Clay」でフィルタリングしている。

// グリッドのフィルタリング
$("#grid").jsGrid("search", { Name: "Otto Clay" }).done(function() {
    console.log("Otto Clayが見つかりました!");
});

2020-09-21.png

参考

Documentation - jsGrid

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?