If i clicked “Add”, i see modal window with confirm options
After confirm loaded in modal all my page, and button “ok”// Row Custom Action event
function Row_CustomAction($action, $row) {
// Return FALSE to abort
if ($action == “gobook”) { // Check action name
ew_Execute(“INSERT INTO account_manag_languages (profiles_id, id_language_pair) VALUES (”.CurrentUserID().“, " . $row[“id”].”)");
return TRUE; // Success
}
I click “ok”
And Nothing … result is emptyHow can i looking massif $row ?
Are you sure the following SQL produces the right result?“INSERT INTO account_manag_languages (profiles_id, id_language_pair) VALUES (”.CurrentUserID().“, " . $row[“id”].”)“Try to display it using setSuccessMessage method that belongs to the page to make sure it contains the valid value:$this->setSuccessMessage(“INSERT INTO account_manag_languages (profiles_id, id_language_pair) VALUES (”.CurrentUserID().”, " . $row[“id”].“)”);
Try to remove this code:
ew_Execute(“INSERT INTO account_manag_languages (profiles_id, id_language_pair) VALUES (”.CurrentUserID().“, " . $row[“id”].”)");
I solved this problem
Updated php 5.6
I put a checkbox in the settings table Primary Key
Now it is working as I wanted
Thank you!How change style of button (active/not active) after Ajax function?Ajax refresh or … ??
i need will show “new status” for a record.
How can i get result from function ew_SubmitAction() after change status without refresh the page?
The Status is visible after a refresh only.
You can define a callback function as paramter of the ew_SubmitAction() and use this function to update the status.You can refer to the the definition of the we_SubmitAction() in ewp12.js to get more information.
if($action==“star”)
{
$rsnew=[“ceck”=>“1”];
$result=$this->Update($rsnew);
$this->setSuccessMessage(“Convalidato”); //Conn.Execute(“UPDATE presenze SET ceck = ‘1’ WHERE ID=”.$row(“ID”) ); // Assume the field ID is of integer type
}
It seems you have not defined the “star” action from “Page_Load” server event of that List Page. So, make sure you have already defined it in “Page_Load” server event.
I don’t think you need to write the code in “ListOptions_Rendered” server event to define that “star” action, since “Row_CustomAction” event will related to “Page_Load” server event only.