Delete master-detail record Tcxgrid

Asked

Viewed 330 times

0

Good morning, you guys!

Here’s what it is: I set up a grid (Tcxgrid) to have a master (header) and a detail (items) to display grouped information as needed. However, this grid gives the user the option to delete records that were inserted into it using the delete key. But when trying to delete the user-selected item, the RecNo of TOraQuery connected to the detail does not consider the current cursor position, but always the last.

I tried to change the property Deleting in OptionsData to allow the user to delete, but the same does not succeed.

Is there a way to solve this problem or is there an outline solution?

  • Very complicated, noticed link name that the 2 components, Grid and Query are third? Regardless of if yes, maybe the option will be to turn off the master detail before deletion!

  • Junior, yes, they are third party. Tcxgrid from Devexpress and Toraquery is from Devart. But anyway, I already tried it with Tclientedataset, and it still didn’t work out. I just tried to loop the query to delete the record, but to no avail.

1 answer

0


I found the solution:

On the estate DataController of Grid Detalhe, there is an option called KeyFieldNames, it should be related to the "ID" field being deleted.

Tested and worked 100% right.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.