I have a master detail table.
in the detail table I want to retrieve all the value tables from “tquoestion” (id_question, question).
but the value that appears is the bottom record. can anyone provide a solution so that my detail table can fill in questions from the tquestion table.
this is my code
function ListOptions_Rendering()
{
$val = ExecuteScalar("SELECT COUNT(*) FROM tquestion");
$this->GridAddRowCount = $val;
$resultSet = ExecuteQuery("SELECT question FROM tquestion");
while ($row = $resultSet->fetchAssociative()) {
$value = $row["question"];
$this->Q1->EditValue = $value;
}
}
You cannot use Row_Rendered server event for such case.
Since you want to implement it for Grid-Add mode, then you should put this following PHP code inside the Startup Script section of List Page of your tquestion table: