Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
355
Binding JQuery to +/- button
posted

What I am trying to achieve is a load on demand functionality using JQuery and JSON.

I have a value in my table, lets call it "BatchNumber", when I click the + button I want to trigger a function that will make a request to grab all the corresponding data for that particular order row.  How does one bind events to the +/- button? I am not sure where the documentation is for this.  Right now I'm parsing a full JSON dataset, but would like to do this on demand.  If it helps here is my current BLOCKED SCRIPT

    $(function () {
        var data = @Html.Raw(Json.Encode(Model));
        $("#grid").igHierarchicalGrid({
            dataSource: data,
            primaryKey: "BatchNumber",
            autoGenerateColumns: false,
            odata: false,
            initialDataBindDepth: 1,
            columns: [
                { headerText: "Batch Number", key: "BatchNumber", dataType: "string" },
                { headerText: "Process Date", key: "BatchGroupItemDate", dataType: "date", format: "MM-d-yyyy, h:mm tt" },
                { headerText: "Batch Comment", key: "BatchComment", dataType: "string" },
                { headerText: "Number Of Documents", key: "NumberOfDocuments", dataType: "number" },
                { headerText: "Total Transfered", key: "TotalTransfered", dataType: "number" },
                { headerText: "Not Transfered", key: "NotTransfered", dataType: "number" }
            ],
            features: [
                {
                    name: "Sorting",
                    type: "local"
                },
                {
                    name: "Filtering",
                    type: "local"
                },
                {
                    name: 'Paging',
                    type: "local",
                    pageSize: 10
                }
            
            ],
            autoGenerateLayouts: false,
            columnLayouts:[
                {
                    key: "BatchDetails",
                    autoGenerateColumns: false,
                    primaryKey: "Key",
                    foreignKey: "BatchNumber",
                    responseDataKey: 'results',
                    columns: [
                        { headerText: "Order #", key: "Key", dataType: "string" },
                        { headerText: "Process Date", key: "Date", dataType: "date", format: "MM-dd-yyyy, h:mm:ss tt" },
                        { headerText: "Batch Comment", key: "BatchComment", dataType: "string" },
                        { headerText: "Last Error Message", key: "LastErrorMessage", dataType: "string" },
                        { headerText: "Transferred Status", key: "TransferredStatus", dataType: "string" },
                        { headerText: "Transfer Date", key: "TransferDate", dataType: "date"}
                    ],
                    features: [
                {
                    name: "Sorting",
                    type: "local"
                }]
                }
            ]
        });
    });

Parents Reply Children
No Data