Current filter:
                                You should refresh the page.
                                0
                                  • While migrating dxDBInspectors to cxDBVerticalGrids, I stumbled into this problem:
                                    I have a cxDBEditorRow with EditProperties set to ButtonEdit.
                                    When you click the button, the eventhandler is called. In this event the value of the Field that is linked to the cxDBEditorRow gets a new value:

                                    DataSet->FieldByName ("A")->AsString = "NewValue";

                                    But this new value isn't shown immediatly in the cxDBEditorRow. It only shows up when you bring the focus to another row or the DataSet record is posted.
                                    With a regular TDBEdit, or the old dxDBInspector, this new value is visible immediatly.

                                    I added a sample application which demonstrates this issue.

                                    Best regards.

                                    Steps to Reproduce:

                                    1) Run project, begin editing of the ExpressVerticalGrid's field and click on the editors Button.

                                    2) Do the same with ExpressQuantumTreeList and ExpressQuantumGrid.

                                    3) Only in the ExpressQuantumGrid's case the value of the corresponding dataset's field (which is changes in the OnButtonClick handler) is updated from the dataset.

                                VerticalGridEditButton.zip
                                0

                                Hi Peter,

                                The VerticalGrid uses a row's Properties.EditProperties property to represent its values, but when you begin to edit any value in the VerticalGrid, an in-place editor is being created. This editor has the same Properties property as the EditProperties property of your VerticalGrid's row and uses it to edit a value of the corresponding row field. When you finish editing (leave the control or press Enter), the value, if it has been changed, is stored into the corresponding field. However, if you change the corresponding field value in the VerticalGrid's dataset during editing, the data controller will accept these changes, while the in-place editor won't do that. Unlike the ExpressVerticalGrid, the ExpressQuantumGrid updates the corresponding editor value by calling the DataController's internal UpdateControl procedure.

                                But the VerticalGrid doesn't contain such a procedure. So, it seems to be a bug, and we'll fix it in our further releases.
                                In this case, I suggest you set your new value to the editor's Value property. Simply add a few code strings after changing the value command in the EditProperties.OnButtonClick event handler:

                                	
                                [C++Builder]
                                void __fastcall TForm1::cxDBVerticalGrid1AEditPropertiesButtonClick( TObject *Sender, int AButtonIndex) { dxMemData1->FieldByName ("A")->AsString = "New value"; TcxButtonEdit *Edit; Edit = (TcxButtonEdit*)Sender; Edit->EditValue = "New value"; }

                                Thanks,
                                Eugene

                                dxSample_Q101792.zip
                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.