Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: FDQuery.Refresh Selecting all rows in DBGrid


This question is answered.


Permlink Replies: 2 - Last Post: May 18, 2016 4:08 AM Last Post By: Tallys Ferrante
Tallys Ferrante

Posts: 14
Registered: 5/29/11
FDQuery.Refresh Selecting all rows in DBGrid  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 17, 2016 11:13 AM
Hello! I'm Refreshing a FDQuery using FDQuery.Refresh and all of my dbgrid rows are selected.

The problem only occurs when dbMultiSelect of DBGrid is True and you click any row of DBGrid. How to solve this?

Before Refresh
http://i66.tinypic.com/2mqtft3.png

After Refresh
http://i63.tinypic.com/efgqon.png

Thanks in advance
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: FDQuery.Refresh Selecting all rows in DBGrid
Correct
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 17, 2016 10:02 PM   in response to: Tallys Ferrante in response to: Tallys Ferrante
This is a bug. It is fixed now. Two options:
1) I posted patch to https://forums.embarcadero.com/thread.jspa?threadID=212318
If you have FireDAC sources, then you can apply this patch.
2) Otherwise after FDQuery refreshing you will need to call DBGrid.SelectedRows.Clear

--
With best regards,
Dmitry
Tallys Ferrante

Posts: 14
Registered: 5/29/11
Re: FDQuery.Refresh Selecting all rows in DBGrid  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 18, 2016 4:08 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Dmitry Arefiev wrote:
This is a bug. It is fixed now. Two options:
1) I posted patch to https://forums.embarcadero.com/thread.jspa?threadID=212318
If you have FireDAC sources, then you can apply this patch.
2) Otherwise after FDQuery refreshing you will need to call DBGrid.SelectedRows.Clear

--
With best regards,
Dmitry

Thanks for the help Dmitry!
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02