CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Hot to get JQMMobiScroll2 selected values (treelist)

by ali » 30 Jun 2016 18:50

Hi, working with JQMobiScroll2demo, i´m trying to get the selected values without analizing AParams text. Is it possible?
I'm using the IWCGJQMMobiScroll215, having Treelist presets.

Here's is the code with the problems in the comments

Code: Select all
procedure TIWForm2.IWCGJQMMobiScroll215JQMCoreOptionsSelect(Sender: TObject;
  AParams: TStringList);
var i, j, k : integer;
    v1, v2, v3 : string;
begin
  for i := 0 to TIWCGJQMMobiScroll2TreeListOptions(IWCGJQMMobiScroll215.PresetOptions).Items.Count -1 do
  begin
    // selected is allways False
    if TIWCGJQMMobiScroll2TreeListOptions(IWCGJQMMobiScroll215.PresetOptions).Items[i].Selected then
    begin
      v1 := TIWCGJQMMobiScroll2TreeListOptions(IWCGJQMMobiScroll215.PresetOptions).Items[i].Value;
      break;
    end;
  end;
  // value is allways ''
  IWCGJQMLabel2.Text := IWCGJQMMobiScroll215.JQMCoreOptions.Value;
  // IWCGJQMMOBISCROLL215_JQM_DATA=America V Brazil v Sao Paolo v
  AParams.SaveToFile('params.txt');
  {
  AParams
  Here i can find the selected items
  IWCGJQMMOBISCROLL215_JQM_DATA=Asia Japan Kagoshima
  IW_TrackID_=1
  callback=IWCGJQMMOBISCROLL215.DoAjaxRequest
  ajaxevent=JQMCoreOptions.OnSelect
  ComponentName=IWCGJQMMobiScroll215
  }
end;
ali
 
Posts: 35
Joined: 26 May 2015 15:49

by ali » 04 Jul 2016 14:40

Hi, perhaps the question is not clear enough.

I'm testing treelist preset.
I want to know where the selected values are stored in JQMMobiScroll2.
The selected property of the items is false and JQMCoreOptions.Value is empty.

Thank you.
ali
 
Posts: 35
Joined: 26 May 2015 15:49

by Alexander Bulei » 04 Jul 2016 16:24

Hi,

Try:

Code: Select all
JQMMobiScroll2.PresetTreeListOptions.SelectedItem


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 Alexander Bulei » 04 Jul 2016 16:24

Hi,

Try:

Code: Select all
JQMMobiScroll2.PresetTreeListOptions.SelectedItem


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 ali » 04 Jul 2016 18:26

Hi Alex,

It´s a protected property, i can't use it.

protected
property SelectedItem: TIWCGJQMMobiScroll2TreeListItem read GetSelectedItem;
ali
 
Posts: 35
Joined: 26 May 2015 15:49


Return to JQMMobiScroll2

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.