[progress Communities] [progress Openedge Abl] Forum Post: Re: Dropdownlist

  • Thread starter Thread starter egarcia
  • Start date Start date
Status
Not open for further replies.
E

egarcia

Guest
Hello, It looks like you are trying to use the column.values property and the columns.editor property at the same time. (You are probably getting some errors in the JavaScript Console.) You should use one approach or the another. If you use the approach with columns.values, your code in onShow() would look like the following: $scope.grid0.options.columns[3].values = [ { text: "Massachussets", value: "NH" }, { text: "New Hampshire", value: "MA" } ]; If you use the columns.editor approach, your code would look like the following: $scope.grid0.options.columns[3].editor = function (container, options) { // create an input element var input = $(" "); // set its name to the field to which the column is bound ('State' in this case) input.attr("name", options.field); input.appendTo(container); input.kendoDropDownList({ dataTextField: "StateName", dataValueField: "State", dataSource: [ { State: "NH", StateName: "New Hampshire" }, { State: "MA", StateName: "Massachussets" } ] }); }; Please notice that when using this approach, you would also need to set columns.template if you want to display the text for the associated value (StateName in this example). Otherwise, you would only see the text when entering edit mode. You mention that SubContractor is an OpenEdge service. In this case, your dataSource definition should look like the following: dataSource: { type: "jsdo", transport: { jsdo: "SubContractor" } } (Here is a sample of the DataSource definition: oemobiledemo.progress.com/.../j.html.) I hope this helps.

Continue reading...
 
Status
Not open for further replies.
Back
Top