<ColumnDirective
field="CustomerID"
dataSource={[]}
headerText="Customer Name"
width="150"
validationRules={this.validationRules}
foreignKeyValue="ContactName"
foreignKeyField="CustomerID"
/> |
btnclick(args) {
this.gridInstance.getColumnByField("CustomerID").dataSource = customerData;
this.gridInstance.columns = this.gridInstance.columns;
this.gridInstance.refreshColumns();
} |
Hello,
In the sample you provide ( Sample: https://stackblitz.com/edit/react-tu9knk-vxtyqe?file=index.js ) , the list of Customer Names is not provided in the DropDownList, as you can see in this screen shot:
I have a similar issue (using Vue js), could you advise on what to do to have the DropDownList populated ?
Thanks
Julien
[index.js]
btnclick(args) {
var ForeignKeyColumn = this.gridInstance.getColumnByField('CustomerID');
ForeignKeyColumn.dataSource = customerData; // bind the dynamic foreignKey dataSource to column
ForeignKeyColumn.edit.params.dataSource = customerData; // bind the dynamic foreignKey dataSource to the edit params
this.gridInstance.refreshColumns();
}
|
This is solved thx a lot.
Btw, my initial issue was on Vue js, so I copy/paste here part of code which works:
this.$refs.theGrid.getColumnByField('constituentId').dataSource = ds
this.$refs.theGrid.getColumnByField('constituentId').edit.params.dataSource = ds
this.$refs.theGrid.refreshColumns()