ui.igGridAppendRowsOnDemand

ui.igGridAppendRowsOnDemand_image

igGrid AppendRowsOnDemand 機能は、グリッドにデータを追加する機能を提供します。Automatic と Button の 2 つのモードがあります。

Automatic モードでは、ユーザーがグリッドの下へスクロールすると、データが追加されます。

Button モードでは、ユーザーがグリッドの下へスクロールし、「その他のデータを読み込む」ボタンを押すと、データが追加されます。

この API のクラス、オプション、イベント、メソッドおよびテーマに関する詳細は、上記の関連するタブを参照してください。

以下のコード スニペットは、igGrid コントロールをロードオンデマンド機能と初期化する方法を示します。

igGrid コントロールに必要なスクリプト及びテーマを参照する方法については、 「Ignite UI で JavaScript リソースを使用する」 および 「Ignite UI のスタイル設定とテーマ設定」のトピックをご覧ください。

コード サンプル

<!doctype html>
<html>
<head>
    <!-- Infragistics Combined CSS -->
    <link href="css/themes/infragistics/infragistics.theme.css" rel="stylesheet" type="text/css" />
    <link href="css/structure/infragistics.css" rel="stylesheet" type="text/css" />
    <!-- jQuery Core -->
    <script src="js/jquery.js" type="text/javascript"></script>
    <!-- jQuery UI -->
    <script src="js/jquery-ui.js" type="text/javascript"></script>
    <!-- Infragistics Combined Scripts -->
    <script src="js/infragistics.core.js" type="text/javascript"></script>
    <script src="js/infragistics.lob.js" type="text/javascript"></script>
    <script type="text/javascript">
        var infragisticsTweets = [
            {user: "infragistics", userName: "@infragistics", tweet: "Bitcoin Network Speed Breaks 1 Petahash per Second - The Genesis Block http://buff.ly/1f0nNHz", date: "8:35 AM - 23 Sep 13"},
            {user: "infragistics", userName: "@infragistics", tweet: "@BrentSchooley is visiting the Springfield MO .NET UG. Stop by on 9/24 to hear his Designing for Windows 8.1 talk! http://ow.ly/i/3bWHF", date: "7:15 AM - 23 Sep 13"},
            {user: "infragistics", userName: "@infragistics", tweet: "Doing Away With Bad Design Ideas http://buff.ly/1f0o910 ", date: "5:30 AM - 23 Sep 13"},
            {user: "infragistics", userName: "@infragistics", tweet: "Technical Evangelist Mihail Mateev will be at SQL Saturday. Will you? http://bit.ly/1dmvg1K  http://ow.ly/i/3b08W ", date: "3:10 AM - 23 Sep 13"},
            {user: "infragistics", userName: "@infragistics", tweet: "Indigo Studio v2.0 by @wireframesmag http://bit.ly/16IQVzv  http://ow.ly/i/3c8U7 ", date: "1:45 AM - 23 Sep 13"}
        ];
        $(function () {
            $('#grid').igGrid({
            dataSource: infragisticsTweets,
            width: "400px",
            autoGenerateColumns: false,
            localSchemaTransform: false,
            columns: [{
                key: 'Tweets',
                dataType: 'string',
                headerText: 'Infragistics tweets',
                unbound: true,
                template: "<div style='float:left'><img src='infragistics.png' ></img></div><div class='tweet'><p style='height:20px'><span class='tweet-user'>${user}</span><span class='tweet-user-name'>${userName}</span><span class='tweet-date'>${date}</span></p><p class='tweet-text'>${tweet}</p></div>"
            }],
            features: [{
                name: 'AppendRowsOnDemand',
                chunkSize: 5,
                loadTrigger: "button"
            }]
            });
        });
    </script>
</head>
<body>
    <table id="grid"></table>
</body>
</html>

関連サンプル

依存関係

jquery-1.9.1.js
jquery.ui.core.js
jquery.ui.widget.js
infragistics.ui.grid.framework.js
infragistics.ui.shared.js
infragistics.util.js

継承

Copyright © 1996 - 2025 Infragistics, Inc. All rights reserved.