CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Selected value not saving to database

by sbsllc » 04 Feb 2019 21:26

I have a RadioGroupEX setup with two items. "Yes" and "No". "Yes" has a value of 0 and "No" a value of 1.
When I select "Yes" and then save the data nothing is saved to the database. Before anything saves to the database I need to select the second item "No" save the data then go back and select "Yes" before that "Yes" value ever saves.
sbsllc
 
Posts: 101
Joined: 01 Jul 2014 01:37

by Alexander Bulei » 05 Feb 2019 10:22

Hi sbsllc,
Please provide more information about the problem.
Do you use the DataLink? How do you save the data? In which event...?
Or provide the simple testcase.

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 sbsllc » 05 Feb 2019 12:25

Hi Alexander,

Yes, I am using a DataLink.
I am posting the data in a JQButtonOptionsClick event. Something like this:

procedure TfrmApplication.IWCGJQButton1JQButtonOptionsClick(Sender: TObject;
AParams: TStringList);
begin
qryApplication.Post;
end;
sbsllc
 
Posts: 101
Joined: 01 Jul 2014 01:37

by Alexander Bulei » 06 Feb 2019 10:36

Hi sbsllc.

Please send me the simple testcase project, I'm not able to reproduce this issue.

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 sbsllc » 06 Feb 2019 15:53

I am attaching a test case using TClientDataSet. It's not pretty but it should show the issue I am having.

To reproduce first click insert and select "Yes" then submit. If you then refresh the data in the grid you will the value is null.
If you then click edit and select "No" then submit and refresh the value will be 0.
Edit again and select "Yes' then submit and refresh and the value will be 1.

It's that first select of "Yes" and then posting the data that results in a null value.
If I try to show the selected value using IWCGJQRadioGroupEx1.Items.Items[IWCGJQRadioGroupEx1.ItemIndex].Value I get an Argument out of range error that first time.

I am using version 4.1.0.152
You do not have the required permissions to view the files attached to this post.
sbsllc
 
Posts: 101
Joined: 01 Jul 2014 01:37

by Alexander Bulei » 08 Feb 2019 17:05

Hi sbsllc.
Thank you for your testcase.
It's a bug with DataLink, and I've already fixed it for next beta release.
Thank you.

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


Return to JQRadioGroupEx

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.