Welcome, Guest. Please login or register.
Did you miss your activation email?
Oct. 06, 2008, 11:43:49 PM
47574 Posts in 10432 Topics by 5322 Members
Latest Member: euofulano
News: Class documentation is handy to learn about component properties, events and methods.
 
The PRADO Community » Prado v3.x » General Discussion » Active Controls (Ajax) » Dynamic ActiveButton « previous next »
Pages: [1] Print
Author Topic: Dynamic ActiveButton  (Read 1372 times)
maisam
Senior Member
***

Karma: 5
Offline Offline

Posts: 108


View Profile
« on: Sep. 21, 2006, 07:06:35 AM »

hello to all

I want create a Dynamic TActiveButton , my php code is:
Code:
               $button=new TActiveLinkButton();
$button->setText($text);
$button->onCallBack("Paging");
$button->onClick("Paging");
$button->setCommandName($commandName);
$button->setCommandParameter($text);
$button->setCausesValidation(false);
                                $this->getPage()->GetControls()->add($button);


but, when i click on this button ,  callback not work!!!!
please help me , for it.
thanks.
Logged
vincedev
Senior Member
***

Karma: 12
Offline Offline

Posts: 349


Weather seems cold today...


View Profile
« Reply #1 on: Sep. 21, 2006, 08:07:37 AM »

Hi,

I think your onCallBack setting is not good:

try this    
Code:
$button->onCallBack = array ($this, 'Paging');
where Paging is a function

also try to set an ID to $button ...
Logged

.......Vince.......
durgis
Senior Member
***

Karma: 20
Offline Offline

Posts: 342


View Profile
« Reply #2 on: Sep. 21, 2006, 02:48:17 PM »

Actually just using the onClick will be fine, since it is also called during callback. That way it will respond whether it is a callback, or normal postback.
Also, I believe you should use brackets like setting an array item.

Code:
$button->OnClick[] = array($this, "Paging");
Logged
Pages: [1] Print 
« previous next »
Jump to: