第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

將 HTML 表單中的數(shù)據(jù)插入 Kendo 網(wǎng)格數(shù)據(jù)

將 HTML 表單中的數(shù)據(jù)插入 Kendo 網(wǎng)格數(shù)據(jù)

PHP
素胚勾勒不出你 2021-11-26 19:41:34
我試圖在下拉列表中選擇數(shù)據(jù),然后提交到劍道網(wǎng)格中。但是,數(shù)據(jù)未能插入到網(wǎng)格中。任何人有想法或解決方案?HTML 提交按鈕<button class="k-button" id="btnSave" value="submit" style="float:right; padding: 5px 20px; border-radius: 4px;" >Submit</button>JavaScript 按鈕提交    //AJAX call for button    $("#btnSave").kendoButton();    var button = $("#btnSave").data("kendoButton");    button.bind("click", function(e) {    var test = $("#accountLedger").val()    $.ajax({        url: "../GroupManagement/get.php",        type: "POST",            data: {                method: "addGroup",                accountLedgerID: $("#accountLedgerID").val()                },                success: function () {                                kendo.alert ('success');JavaScript 下拉菜單        $("#accountLedger").kendoDropDownList({        dataTextField: "accountLedgerName",        dataValueField: "accountLedgerID",        optionLabel: "Choose account ledger",        dataSource: {            transport: {                read: {                    url:  "./getCoaGroup.php",                    type: "POST",                    data: function() {                            return {                                 method: "getAccLedger",                        }                    }                },            },        },        //change: onChange(),        change: function(e){            console.log(this.value());            $('#grid').data('kendoGrid').dataSource.read();            homogeneous.read();        }    }).data('kendoDropDownList');    dropdownlist = $("#accountLedger").data("kendoDropDownList");這是我的輸出如果您看到圖片,列分類帳名稱上方的網(wǎng)格沒有數(shù)據(jù)。它假設(shè)用戶選擇下拉列表然后單擊提交。之后,下拉列表中的選定數(shù)據(jù)將插入到網(wǎng)格中。希望任何人都可以對此提供任何參考。謝謝!
查看完整描述

2 回答

?
慕虎7371278

TA貢獻1802條經(jīng)驗 獲得超4個贊

: {'transport' 和 'read' 之后應(yīng)該有你的代碼。


下面這部分代碼固定:


dataSource: {

        transport: {

            read: {

                url:  "./getCoaGroup.php",

                type: "POST",

                data: function() {

                        return { 

                            method: "getAccLedger",

                    }

                }

            },

        },


查看完整回答
反對 回復(fù) 2021-11-26
?
Cats萌萌

TA貢獻1805條經(jīng)驗 獲得超9個贊

我不確定它是否有效,但您是否嘗試將其更改accountLedgerID為其他名稱。我也遇到了同樣的問題,可能是因為變量名混淆了。

JavaScript 按鈕提交

accLedgerID: $("#accountLedgerID").val()

PHP

$accLedgerID= (isset($_POST['accLedgerID']) ? $_POST['accLedgerID'] : '');


查看完整回答
反對 回復(fù) 2021-11-26
  • 2 回答
  • 0 關(guān)注
  • 237 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號