Hi,
I have a datagrid where one of the columns is tied to a lookup with lookup options. When I add a row using this syntax -->
this.addRowDatagridTS.addRow(addRowItems, 'bottom');
A new row is being created. However, the row for the column where lookup exists doesn't get updated. The other column without lookup is being updated.
The data is exists in debug. I also tried to append the data to the other columns and it worked(addStatus). The only issue is the column with lookup. Does anyone know if this is a bug or not? Below is my datagrid options together with lookup options.
this.addlines_gridOptions = {
columns: ADDLINE_COLUMNS,
dataset: this.addlines_Dataset,
clickToSelect: false,
selectable: 'mixed',
idProperty: 'rowNumber',
editable: true,
rowHeight: 'medium',
filterable: true,
showDirty: true,
alternateRowShading: true,
paging: true,
};
export const ADDLINE_COLUMNS: any[] = [
.
.
.
{
id: 'addITNO',
name: 'Item Number',
field: 'ITNO', // CHANGING THIS FROM ADDITNO TO ITNO SHOWS THE VALUE BUT DELETES IT IN BACKGROUND
sortable: true,
filterType: 'text',
width: 100,
formatter: Soho.Formatters.Lookup,
editor: Soho.Editors.Lookup,
editorOptions: ITNO_LOOKUP_OPTIONS,
required: true,
validate: 'required',
},
.
.
.
{
id: 'addStatus',
name: 'Status',
field: 'addStatus',
sortable: false,
filterType: 'text',
width: 100,
formatter: Soho.Formatters.Readonly,
editor: Soho.Editors.Input,
required: false,
},
];
export const ITNO_LOOKUP_OPTIONS = {
field: FIELD_FN,
match: MATCH_FN,
options: {
field: 'ITNO',
columns: LOOKUP_COLUMNS,
dataset: null,
selectable: 'single',
autoApply: true,
paging: true,
pagesize: 20,
pagesizes: [20, 30, 50, 100],
toolbar: {
title: 'Items',
results: true,
dateFilter: false,
keywordFilter: true,
advancedFilter: false,
actions: true,
views: false,
rowHeight: true,
},
},
};
export const LOOKUP_COLUMNS = [
{
id: 'ITNO',
name: 'Item Number',
field: 'ITNO',
formatter: Soho.Formatters.Text,
sortable: true,
},
{
id: 'ITDS',
name: 'Description',
field: 'ITDS',
formatter: Soho.Formatters.Text,
sortable: true,
},
];
EDIT: This is working now. Had to change all addITNO to ITNO to match it with the lookup and not mess with the display on the datagrid.