javascript - Shield ui grid hierarchy grid make non-editable while main grid editable -


i made rows of main grid editable , there no need of editing rows in hierarchy grid.but problem once click on row of hierarchy grid becomes editable , value of same column number of main grid appear in selected column of hierarchy grid. below picture attached here make more sense.enter image description here

so mentioned dont need happened in hierarchy grid.

here code far....

$("#alltransgrid").shieldgrid({                                 datasource: {                                     data: datad,                                     schema: {                                         fields: {                                             mbr_id: {path: "mbr_id", type: string},                                             lon_id: {path: "lon_id", type: string},                                             center_name: {path: "center_name", type: string},                                             grp_name: {path: "grp_name", type: string},                                             mbr_name: {path: "mbr_name", type: string},                                             lon_amt: {path: "lon_amt", type: number},                                             lon_int_amt: {path: "lon_int_amt", type: number},                                             loan_total: {path: "loan_total", type: number},                                             ind_inst: {path: "ind_inst", type: number},                                             today_pay: {path: "today_pay", type: number, nullable: false},                                             lon_id_as: {path: "lon_id_as", type: number}                                         }                                     }                                 },                                 sorting: {                                     multiple: true                                 },                                 paging: {                                     pagesize: 12,                                     pagelinkscount: 10                                 },                                 events: {                                     editorcreating: function (e) {                                         if (e.field == "ind_inst") {                                             e.options = {enabled: false, max: 1000};                                         }                                         if (e.field == "loan_total") {                                             e.options = {enabled: false, max: 500000};                                         }                                         if (e.field == "lon_int_amt") {                                             e.options = {enabled: false, max: 100000};                                         }                                         if (e.field == "lon_amt") {                                             e.options = {enabled: false, max: 100000};                                         }                                         if (e.field == "mbr_name") {                                             e.options = {enabled: false};                                         }                                         if (e.field == "grp_name") {                                             e.options = {enabled: false};                                         }                                         if (e.field == "center_name") {                                             e.options = {enabled: false};                                         }                                         if (e.field == "lon_id") {                                             e.options = {enabled: false};                                         }                                         if (e.field == "mbr_id") {                                             e.options = {enabled: false};                                         }                                         if (e.field == "today_pay") {                                             e.options = {max: 10000};                                             console.log(e.options);                                         }                                      },                                     detailcreated: function (e) {                                         $.ajax({                                             url: "paymentcatchergroupby",                                             cache: false,                                             datatype: 'json',                                             data: {loan_id: e.item.lon_id_as, c_id: center_id},                                             success: function (data) {                                                 $("<div/>")                                                         .appendto(e.detailcell)                                                         .shieldgrid({                                                             datasource: {data: data},                                                             sorting: {                                                                 multiple: true                                                             },                                                             paging: {                                                                 pagesize: 5                                                             },                                                             columns: [                                                                 {field: "installment_num", title: "week"},                                                                 {field: "installmentamount", title: "installment amount"},                                                                 {field: "paidamount", title: "paid amount"},                                                                 {field: "duedate", title: "date paid", type: date}                                                             ],                                                             events: {                                                                 editorcreating: function (e) {                                                                     if (e.field == "installment_num") {                                                                         e.options = {enable: false};                                                                     }                                                                 }                                                             }                                                         });                                             }, error: function (jqxhr, textstatus, errorthrown) {                                                 alert('error');                                             }                                         });                                      }                                 },                                 selection: {                                     type: "row",                                     multiple: true,                                     toggle: false                                 },                                 columns: [                                     {field: "mbr_id", width: "100px", title: "member id", enabled: false},                                     {field: "lon_id", width: "100px", title: "loan id"},                                     {field: "center_name", title: "center name", width: "100px"},                                     {field: "grp_name", title: "group name", width: "70px"},                                     {field: "mbr_name", title: "member name", width: "170px"},                                     {field: "lon_amt", title: "loan amount", width: "100px"},                                     {field: "lon_int_amt", title: "interest", width: "100px"},                                     {field: "loan_total", title: "total", width: "80px"},                                     {field: "ind_inst", title: "installment amount", width: "120px"},                                     {field: "today_pay", title: "today payment"}                                 ],                                 editing: {                                     enabled: true,                                     event: "click",                                     type: "cell"                                 },                                 scrolling: true,                                 height: 600                             }); 

any appreciable. thank !

you can disable editing of detailed grid:

https://www.shieldui.com/documentation/grid/javascript/api/settings/editing

or can set editable false columns not want edit.

columns: [ {field: "mbr_id", width: "100px", title: "member id", editable: false},

i hope solve issue.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

C# - WPF - ColumnGroups Footer? (telerik) -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -