Freeman35 Posted September 28, 2018 Share Posted September 28, 2018 Hello, I wanna selected row in unidbgrid, after add new row to Tdataset. I have primary key and I use TDataset.locate. This is set cursor position on tdataset, but unidbgrid, show first row. I mean TFDDataset.locate not move selected row in unidbgrid. How to do this? Thank you. Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted November 12, 2018 Author Share Posted November 12, 2018 Has any suggestion? Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted November 12, 2018 Author Share Posted November 12, 2018 NO solution Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 12, 2018 Share Posted November 12, 2018 Hello, Can you please make a simple testcase and indicate steps for reproduce? Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted November 13, 2018 Author Share Posted November 13, 2018 Sorry I been late, I'm investigate more and find bug. I attached demo.Its from unigui demo. GridGrouping. I aaded one edit and two buttons. first button event do: close dataset, load data, open dataset then locate. Second button do: locate opened dataset. My problem is first one. Becaouse, I haveto do this. I have to locate after open dataset, so end user not haveto re locate in grid. If I'm not wrong, grid not load data so can not locate row. Test in Third button. AfterLoad event using and locate work as expected GridGrouping-Locate-problem.7z Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted November 13, 2018 Author Share Posted November 13, 2018 My sugesstion is, can add Locate function to unidbgrid. this function, wait load grid then lacate dataset and then lacate row on grid. regards Quote Link to comment Share on other sites More sharing options...
MSMK Posted December 12, 2018 Share Posted December 12, 2018 On 9/28/2018 at 2:24 PM, Freeman35 said: Hello, I wanna selected row in unidbgrid, after add new row to Tdataset. I have primary key and I use TDataset.locate. This is set cursor position on tdataset, but unidbgrid, show first row. I mean TFDDataset.locate not move selected row in unidbgrid. How to do this? Thank you. Hello! Did you find a solution to this problem? I have a similar situation (google translate) Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted December 12, 2018 Author Share Posted December 12, 2018 My solution is: procedure T_FRM.GRD_AfterLoad(Sender: TUniDBGrid); begin if GRD_.Tag>0then begin GRD_.DataSource.DataSet.Locate('PR_KEY', GRD_.Tag, []); GRD_.Tag:= 0; end; end; 1 Quote Link to comment Share on other sites More sharing options...
TI.ME Posted October 1, 2019 Share Posted October 1, 2019 The problem was solved? I still have problem with locate after opening Dataset ... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 1, 2019 Share Posted October 1, 2019 20 minutes ago, TI.ME said: The problem was solved? I still have problem with locate after opening Dataset ... Which edition and build of UniGUI are you using?! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.