Forum > Packages and Libraries

[Solved] RxDBGrid bug

(1/1)

lainz:
Hi, attached a test project that shows partially the bug I'm experiencing.

When marking the first and second checkbox, then making a search, then deleting the search, only the first checkbox remains checked. That's all I can reproduce on a small project, but this is bigger, it sometimes duplicates the 'Name' field into the second field. And sometimes I do a filter and it gives 2 items duplicated insted of one.

Seems that there's a problem with filtering the grid...

lainz:
Anothet attachment, the same demo with DBGrid (not Rx) works fine.

paweld:
In my opinion, there is no error here, and in my case both examples (RxDBGrid and DBGrid behave equally).
As you check the box, you set the DataSet in dsEdit state, going straight to the search box does not save the changes, and last checked checkbox disappears when you refresh the DataSet.
You can solve this either by manually clicking another row after checking the box (then the changes will be saved) or programmatically when exiting the (Rx)DBGrid control check if the DataSet is in edit mode and if so, save the changes.

Solution:
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.RxDBGrid1Exit(Sender: TObject);begin  if MemDataset1.State = dsEdit then    MemDataset1.Post;end;

lainz:
Thanks paweld! That works for me.

Many thanks for your help!!  :)

Navigation

[0] Message Index

Go to full version