listview - kendoui: Displaying foreign key value not ID -
i have kendo ui listview , in edit mode im using dropdownlist handle foreign keys, these work fine in displaying foreign key value , not id, in normal view mode loads first foreign key id displayed instead of value.
im wondering best practice when wanting display foreign key value. ive tried solving problem @ sql level using 'inner join' statement in datasource read call, causes fields conflicts when doing , update/create foreign key value field doesnt exist in original table.
heres code lenders dropdown
var dslenders = new kendo.data.datasource({ transport: { read: { url: "../data/lenders/", datatype: "jsonp" }, parametermap: function(options, operation) { if (operation === "read") { homecoming options; } } } });
heres code list view
var claimlistview = $("#formclaim").kendolistview({ datasource: remotedatasource, template: kendo.template($("#viewtemplate").html()), edittemplate: kendo.template($("#formtemplate").html()), databound: function(e) { this.edit(this.element.children().first()); } }).data("kendolistview");
heres dropdownlist in edittemplate loads list of lenders works fine
<input name="idldr_clm" data-bind="value:idldr_clm" data-value-field="id_ldr" data-text-field="name_ldr" data-option-label="select" data-source="dslenders" data-role="dropdownlist" />
now here im using in normal view template view display lender. showing id , not lender name. want pull lenders name.
<input value="#= idldr_clm #" class="k-input k-textbox" readonly />
listview foreign-keys kendo-ui
No comments:
Post a Comment