Posted 21 August 2018, 3:41 am EST
Hello,
I have below column structure in Flexgrid.
<wj-flex-grid control="flexGrid"
style="height:300px; border-bottom: 1px solid #d9d9d9"
class="bento-flex-grid validate"
items-source="assignments"
selection-mode="Cell"
headers-visibility="Column"
allow-sorting="true"
allow-delete="true"
is-read-only="false"
key-action-tab="Cycle"
item-formatter="itemFormatter"
validate-edits="false"
initialized="initialized(s)"
show-errors="true"
allow-dragging="None"
selection-changed="selectionChanged(s,e)"
cell-edit-ended="cellEditEnded(s,e)">
<!-- BEGIN: NEW BENTO SELECTOR -->
<wj-flex-grid-column header="" width="40" min-width="40" binding="selected" allow-sorting="false" allow-dragging="false" allow-resizing="false" is-read-only="true" css-class="col-select" align="center">
<wj-flex-grid-cell-template cell-type="ColumnHeader">
<div class="col-select">
<i class="bento-flex-grid-checkbox"
ng-click="onHeaderCheckBoxChange()"
ng-model="headerCheckBoxMode"
data-qe-id="bmad.header.checkbox"
ng-class="{'bento-icon-checkmark': headerCheckBoxMode}">
</i>
</div>
</wj-flex-grid-cell-template>
<wj-flex-grid-cell-template cell-type="Cell">
<i class="bento-flex-grid-checkbox"
ng-click="onCheckBoxChange($item)"
ng-model="$item.selected"
data-qe-id="bmad.checkbox - {{$item.sequenceNumber}}"
ng-class="{'bento-icon-checkmark':$item.selected}">
</i>
</wj-flex-grid-cell-template>
</wj-flex-grid-column>
<wj-flex-grid-column header="{{'bmad.OpeningBalance.Assignments.Account' | translate }}"
binding="selectedAccount"
data-type="Object"
width="*">
<wj-flex-grid-cell-template cell-type="Cell">
<div class="truncate-text-flex" data-qe-id="bmad.account.tooltip - {{$item.sequenceNumber}}">
<small ng-style="$item.selectedAccount.accountNumber == null && {'color' : 'rgb(175, 175, 175)'}" data-qe-id="bmad.accountLabel - {{$item.sequenceNumber}}">{{($item.selectedAccount.accountNumber != null)? $item.selectedAccount.accountNumber + ' - ' + $item.selectedAccount.description : 'Start typing or choose from drop down list' }}</small>
</div>
</wj-flex-grid-cell-template>
<wj-flex-grid-cell-template cell-type="CellEdit">
<div bento-combobox
data-qe-id="bmad.accountinput - {{$item.sequenceNumber}}"
columns-width="auto"
placeholder="{{'bmad.OpeningBalance.Assignments.PlaceHolder' | translate}}"
get-data="getData()"
headers="comboboxData.headers"
label-name="label"
searchable="true"
ng-model="$value"
bento-append-to-parent="true"
defer-load="true" bento-flex-grid-control>
</div>
</wj-flex-grid-cell-template>
</wj-flex-grid-column>
</wj-flex-grid>
In this I want to sort on column “selectedAccount”. I am trying below code in js but that is not working.
$scope.assignments.sortDescriptions.push(new wijmo.collections.SortDescription("selectedAccount", "true"));
Thanks