add parameters in qdatagrid action
Wed, 05/18/2011 - 10:58
Hi, I'm trying to add a parameter when I click into a qdatagrid.
I do this:
[in Form_Create()]
...
$this->datagrid->AddAction(new qclickevent(),new qajaxaction('nameAction');
$this->datagrid->ActionParameter=44;
...
[in nameAction($strFormId,$strControlId,$strParameter)]
...
qapplication::displayAlert($strParameter);
...
When I run it, I can't see the parameter with value 44, it shows 1,why??how can I do to add a exact parameter in the actions??
thanks!

try this:
$this->datagrid->RowActionParameterHtml = '<?= $_ITEM->Id ?>';
$this->AddRowAction(
new QClickEvent(),
new QServerAction('dtgRow_Click')
);
...
public function dtgRow_Click($strFormId, $strControlId, $strParameter) {
}
yes, I did it too. The problem is that I need manage the checkboxs from header in the qdatagrid. I have 'AddRowAction' when I click into a row and I want custom the 'AddAction' in qdatagrid to do something when I click in these checkbox.