CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

IWCGJQMSelect runtime item creation

by BrunoCerqueira » 13 Feb 2013 17:02

Hi,

Is it possible to clear and populate this component on runtime ?

Can't find an item "add" property to do so...

thanks
BC
BrunoCerqueira
 
Posts: 27
Joined: 04 Oct 2012 05:42

by Jorge Sousa » 13 Feb 2013 17:22

BrunoCerqueira said

Hi,

Is it possible to clear and populate this component on runtime ?

Can't find an item "add" property to do so...

thanks
BC


Hi Bruno,
You can only create select's and items.
Operations like Add / Remove can be used with AjaxReRender.

Here is simple example of dynamically creating:

procedure TIWForm15.IWAppFormCreate(Sender: TObject);
var
LSelBox: TIWCGJQMSelectBox;
LSelBoxItem: TIWCGJQMSelectBoxItem;
I: Integer;
begin
LSelBox:= IWCGJQMSelect1.SelectBoxList.Add;
for I := 0 to 5 do
begin
LSelBoxItem:= LSelBox.Items.Add;
LSelBoxItem.Caption:= 'Item ' + IntToStr(i);
LSelBoxItem.Value:= IntToStr(i);
end;
end;


Usage of AjaxReRender:


IWCGJQMSelect1.AjaxReRender();


cgdevtools
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by BrunoCerqueira » 13 Feb 2013 17:40

Thanks that did it ;)

BC
BrunoCerqueira
 
Posts: 27
Joined: 04 Oct 2012 05:42


Return to JQMSelect

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.