jQWidgets Forums
jQuery UI Widgets › Forums › Grid › DisplayField in Grid not displaying
Tagged: displayfield, grid
This topic contains 2 replies, has 2 voices, and was last updated by Hristo 6 years, 7 months ago.
-
Author
-
I believe I have followed the demos correctly. However, the display field in the Grid does not show. Below are the sections of the code I think are relevant. The column in quetion is “ORIGINATION”.
Please look and advice. Thanks.
Source for the foriegn values:
var addSource ={ type: 'POST', datatype: "json", datafields: [ { name: 'ADDID', type:'integer'}, { name: 'ADDNAME', type:'string'}, ], url: 'get_trans_lookups.php', data: { featureClass: 'P', style: 'full', maxRows: 250, QUERY: 'ADDRESS' } }; var addAdapter = new $.jqx.dataAdapter(addSource,{autoBind: true});
Source for Grid records:
var source ={ datatype: "json", localdata: transData, datafields: [ { name: 'TID', type:'integer'}, { name: 'START_DATE', type:'date'}, { name: 'APPT_TIME', type:'date'}, { name: 'RIDER_ID', type: 'string' }, { name: 'ORIGVAL', value: 'ORIG', values:{source: addAdapter.records, value: 'ADDID', name: 'ADDNAME'}}, { name: 'DEST1', type: 'string' }, { name: 'DR1', type: 'string' }, { name: 'DEST2', type: 'string' }, { name: 'DR2', type: 'string' }, { name: 'DEST3', type: 'string' }, { name: 'DR3', type: 'string' }, { name: 'VEH_ID', type: 'string' }, { name: 'COMP', type: 'bool' }, { name: 'CANTRIP', type: 'bool' }, ], ID: 'TID', async: false }; var dataAdapter = new $.jqx.dataAdapter(source);
Definition of column in Grid:
{ text: 'ORIGINATION', align: 'center', datafield: 'ORIG', displayfield: 'ORIGVAL', columntype: 'dropdownlist', cellsalign: 'center', width: 164, cellclassname: cellclassname, createeditor: function (row, value, editor) {editor.jqxDropDownList({source: addAdapter, displayMember: 'ADDNAME', valueMember: 'ADDID', width: 300 }) } },
Anyone with an answer.
Hello CXXXV,
Could you clarify it?
Is there any error message in the console?
I tested this example and it seems to work fine.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.