CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

LocateSelectedRowId fails

by etwoss » 06 Apr 2016 18:45

Hi

I have Grid connected to a clientdataset.

Code: Select all
procedure TFrmConsultantTrajecten.grdMainJQGridOptionsSelectRow(Sender: TObject;
  AParams: TStringList);

begin
   grdMain.LocateSelectedRowId;


The key is a set of 4 fields:

Code: Select all
   JQGridProviderType = 'DataSet'
   JQGridProvider.KeyFields = 'CLIENT_ID,TRAJECT_ID,STARTDATUM,UNIEK_ID'


As you can see in the dump i get an " Unable to Locate Record for ID "203<!>11<!>2016-02-24<!>1"!" error on
grdMainJQGridOptionsSelectRow

two things:

1) i can't understand why because the grid is datatable connected so it should always be able to locate the record
2) why is an error raised in this condition. Perhaps better to make it a Boolean function returning true if found , false if not

Eric



Code: Select all
Exception message  : Unable to Locate Record for ID "203<!>11<!>2016-02-24<!>1"!
Exception class    : EIWCGJQGridProvider
Exception address  : 00A98B34
Exception Time     : 2016-04-06 12:11:25.036
------------------------------------------------------------------------------------------------------------------------
Application Name   : REIPortal.exe
Application Version:
Started at         : 2016-04-04 21:46:45.371
Running for        : 1 day 14 hours 24 minutes 39 seconds
Computer Name      : RE-BASE-WEB01
Compiler Version   : 300
------------------------------------------------------------------------------------------------------------------------
IntraWeb Version   : 14.0.52
Multi-session      : False
Content Path       : C:\ReiPortal\wwwroot\
Session count      : 37
Application Path   : C:\ReiPortal\
Active Form        : FrmMainAdministrator (TFrmMainAdministrator)
Active Form list   : [1] FrmLogon (TFrmLogon)
                     [2] FrmMainAdministrator (TFrmMainAdministrator)
Form list          : [1] IWUserSession (TIWUserSession)
                     [2] FrmLogon (TFrmLogon)
                     [3] FrmMainAdministrator (TFrmMainAdministrator)
Browser Name       : Chrome
Browser UserAgent  : Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36
Session ID         : ve-fn-5WUuImouR7Id~19a
Last Access        : 2016-04-06 12:11:23.124
Callback           : True
Runtime parameters :
------------------------------------------------------------------------------------------------------------------------
Client IP address  : 127.0.0.1
Request PathInfo   : /$/callback
Request Method     : POST
Request User Agent : Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36
Cookies Count      : 2
------------------------------------------------------------------------------------------------------------------------
(00697B2F){REIPortal.exe} [00A98B2F] IWCGJQGridDataSetProvider.TIWCGJQGridDataSetProvider.LocateRowId$qqrp25System.Classes.TComponentx20System.UnicodeString + $97
(006F6555){REIPortal.exe} [00AF7555] IWCGJQGrid.TIWCGJQCustomGrid.LocateSelectedRowId$qqrv + $65
(0082178C){REIPortal.exe} [00C2278C] fConsultantTrajecten.TFrmConsultantTrajecten.grdMainJQGridOptionsSelectRow$qqrp14System.TObjectp26System.Classes.TStringList (Line 351, "fConsultantTrajecten.pas" + 6) + $9
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58

by Alexander Bulei » 07 Apr 2016 10:27

Hi Eric,

Please debug and check if you can locate the record with your key fields.

The main function of our LocateSelectedRowId is :

Code: Select all
ADS.Locate(Fields.DelimitedText,KeyValues,[]);


Also, please check the value of JQGridOptions.SelRow.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by etwoss » 07 Apr 2016 13:55

Hi

Ok i will debug. I have never see this fail during testing.

Also, please check the value of JQGridOptions.SelRow.


I do this first, only not shown in the code i presented :-)

Eric
etwoss
 
Posts: 1205
Joined: 06 Feb 2014 08:58


Return to JQGrid

cron

Who is online

Users browsing this forum: No registered users and 14 guests

Contact Us.