Hi.
I am trying to get the dxDataGrid “state()” as documented here: https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxDataGrid/Methods/#state
I have tried:
var loState = await this.dxDataGrid1.Instance.state();
But this returns null.
Also, adding a WidgetFunction (named getState) through the Designer:
return this.Instance.state();
And then, from the server:
var loState = await this.dxDataGrid1.CallAsync("getState");
But I get an Error in the Console:
dxDataGrid1.getState:5 Uncaught TypeError: Cannot read property ‘state’ of undefined
Would anyone have a tip on how I could get the dxDataGrid “state()” ?
Thanks in advance.
Ivan
(Wisej 2.2.46.0 – VS 2019 – C#)
Use
var state = await this.dxDataGrid1.Instance.stateAsync();
The state() method in devextreme returns a promise (https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxDataGrid/Methods/#state) which is an asynchronous method.
OK, got it to work using the WidgetFunction, entering the following:
return App.FornecedoresMaintenance.tcView.tpGrid.dxDataGrid1.widget.state();
I saw the this.Instance.state() in the DevEx Sample solution from Wisej GitHub. Why is it it works in that case?
Cheers.
Ivan
Please login first to submit.