Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#turbingrid").kendoGrid({
- // debugger;
- dataSource: dataSource,
- scrollable: false,
- columns: [
- { field: 'DeviceIP', title: 'DeviceIP', width: '100px', id: 'DeviceIP' },
- { field: 'Producer', title: 'Producer', width: '80px', editor: ProductNameDropDownEditor, },
- { field: 'Model', title: 'Model', width: '220px' },
- { field: 'DeviceType', title: 'DeviceType', width: '100px',editor: deviceTypesList },
- { field: 'Description', title: 'Description', width: '220px' },
- { field: 'Username', title: 'Username', width: '120px' },
- { field: 'Password', title: 'Password', width: '100px' },
- { field: 'PublicIP', title: 'PublicIP', width: '120px' },
- { field: 'device_id', title: 'device_id', width: '120px', hidden: true },
- { field: 'ModelProducer', title: 'ModelProducer', hidden: true, editor: modelProducer },
- { command: ["edit"], title: " " }],
- editable: "popup",
- //edit:
- // function () {
- // document.getElementsByName("DeviceIP")[0].disabled = true;
- // },
- edit: function(e) {
- e.container.find("label[for='device_id']").parent().hide();
- e.container.find("div[data-container-for='device_id']").hide();
- var ss = $("#DeviceType").val();
- $.ajax({
- dataType: "json",
- type: "POST",
- url: "@Url.Action("modelProducer","AdminTool")",
- contentType: "application/json; charset=utf-8",
- data: JSON.stringify({ "turbineType": ss, }),
- success: function (data) {
- modelProducerResult = data;
- debugger;
- function modelProducer(container, options) {
- $('<input name="ModelProducer" data-type="string"">')
- .appendTo(container)
- .kendoDropDownList({
- valuePrimitive: true,
- dataSource: modelProducerResult,
- dataTextField: "model",
- dataValueField: "model",
- });
- debugger;
- }
- }
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement