CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Determining the item that was checked

by JohnFSklavounos » 14 Feb 2015 06:35

Hi Guys,

My brain is a little mushy... How can I tell which specific TIWCGJQMCheckButton within the list was just checked? I am trapping the OnChange event in the JQMCheckButtonOptions but the params have a complete list of all the checked items. I also can't drive backwards from the Sender because it's the TIWCGJQMCheckButtonsEvents which brings me one level higher than the button list.

In the end, I just want to know the specific one that caused the event to occur. Any ideas?

Thanks!
John
John F. Sklavounos
Software Developer
Always learning

XE7: Update 1
FireDAC: 20.0.16277 (Build 1276)
IW: 14.0.41
CG : 2.6.0.100
JohnFSklavounos
 
Posts: 109
Joined: 14 Aug 2013 00:35
Location: Miami, FL

by Alexander Bulei » 16 Feb 2015 13:18

Hi John,

Please check this code :

delphi code
procedure TIWAppForm6.IWAppFormCreate(Sender: TObject);
begin
with IWCGJQMCheckButtons1.JQMCheckButtonsOptions.Events.OnChange.BrowserParams.Add do
begin
ServerName:= 'clickedBtnIndex';
BrowserScript:= '$(this).attr("Index")';
end;
end;

procedure TIWAppForm6.IWCGJQMCheckButtons1JQMCheckButtonsOptionsEventsChange(Sender: TObject; AParams: TStringList);
begin
WebApplication.ShowMessage(AParams.Values['clickedBtnIndex']);
end;


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 JohnFSklavounos » 16 Feb 2015 14:15

Hi Guys,

Thanks so much! :D

All my best,
John
John F. Sklavounos
Software Developer
Always learning

XE7: Update 1
FireDAC: 20.0.16277 (Build 1276)
IW: 14.0.41
CG : 2.6.0.100
JohnFSklavounos
 
Posts: 109
Joined: 14 Aug 2013 00:35
Location: Miami, FL


Return to JQMCheckButtons

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.