Dear Support,
I would like to set a certain value in the bound grid and post that value to the database, too. I'm using something like this:
procedure TFrmPLUItems.Button1Click(Sender: TObject);
begin
MainView.DataController.Edit;
MainView.DataController.Values[0, 5] := 'test';
MainView.DataController.Post (true);
end;
On beforePost I can see that the field linked to this column has not changed so 'test' is not posted to the database.
What is the correct approach?
Thank you
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello Johannes,
Thank you for your message.
To change a value in our ExpressQuantumGrid component manually in a bound mode, you need to use the SetEditValue method instead of the Values property.
For more information, please refer to the "TcxCustomDataController.SetEditValue" help topic.
Thank you, Sergey M
Thank you Sergey!
I am aware of the SetEditValue method but it's not really convenient in my case since it only works for the record currently being edited.
Anyway - I have modified the logic to update the underlying dataset directly.
Best regards,
Matej
Hello,
We are glad to hear that you have found our assistance helpful.
Feel free to contact us if you have any questions regarding the use of our controls. We will do our best to find an appropriate solution for you.
Thanks,
Valdemar