Don't fetch cxGrid until record applyupdate

Hi,
I have the cxGrid that show the records and a part of panel for user data edit. If create the new record, it will also show the information in the cxGrid. Is it possible refresh the information in cxGrid after the record is applyupdate?

I don’t believe so, but I would suggest DevExpress support about this, as tis would be a feature specific to their grid, not to Data Abstract.

One option I could see if you could apply filter to the grid that excludes unapplied records (maybe by filtering for positive IDs, if you you AutoIncs?)

Hi,
cxGrid datacontroller is link to same datasource. If I using DAMemDataTable.Append, then cxGrid will add the blank record. User input the data in DBEdit. It will show the same information in cxGrid immediately. So I don’t want the data is showing as the same time until I use ApplyUpdate()

Hi,
I submitted the ticket to DevExpress about cxGrid issue. But they replied that is dataset issue and suggest to using query. That means I need to using “DA Command” ?

I don’t believe so.

Let’s leave this for my colleague when he returns form vacation tomorrow. Maybe he has an idea how to solve this (Delphi is not really my area of expertise, these days ;).

Noted with thanks

1 Like

Hi,

Can you specify why you need this, pls? you can set ruoPost mode in memtable and applyupdate will be performed automatically after Post. if post is failed, table will be return to insert/edit mode and you can correct data.

DevEx support means that you should create a new form w/o DB controls where you can fill all required fields and call DARemoteCommand.
this command should insert a new record. if it was successful, you can refresh data in grid

Hi,
“this command should insert a new record. if it was successful, you can refresh data in grid”
DevEx support suggest me to using the query to handle the cxGrid refresh. That mean I need to separate Data entry section and cxGrid section. If user save the record, then it applyupdate and then refresh the query manually.
My expectation is freeze the DAMemtable and then release it after user save the record. Is it possible? Then I need not to handle two parts of dataset.

Hi,

DevEx gives to you generic solution that isn’t related to DA.
DA can work only in “table” mode and not in “query” mode.
this means that every change in DA table will be shown in correspondent DB control.

you can play with table.DisableControls/EnableControls. it calls similar method of TDataSet and can freeze DB control

Hi,
Thanks for your solution. That’s work and fulfil my expectation.

Hi,
I found the problem about using table.DisableControls/EnableControls. It will not handle the last field if user input the data without leave the field and save it. It will not update the information in table when set EnableControls.
I tested if I haven’t use table.DisableControls/EnableControls, it can save the information even if I haven’t leave the field.

Hi,

try to test this with usual DBGrid. it may be issue with cxGrid only

Hi,
It should not the problem from cxGrid. Because I provide the input section for data input (cxDBTextEdit). It is not using cxGrid to maintain the record directly.

Hi,

if you have problems with table.DisableControls/EnableControls then your UI controls work incorrectly with TDataset.DisableControls/EnableControls that allows/rejects to send data events to visual controls

Hi,
Noted with thanks. I’m force it to next focus before EnableControls that can save the record without onexit the current component.