Hi everybody,
I make questionare with dynamic checkbox control in form. I loaded answers from
salesAnswerTable table , so how to get event for saving them.

And this is method for make questionare
private void addQuestionAnswerActual()
{
FormStaticTextControl formStaticTextControl;
FormCheckboxControl formCheckboxControl;
FormRadioControl formRadioControl;
int j,totalAnswer;
salesTable = salesTable::find('SO16-58976');
while select * from salesQuestionTable order by RecId
where salesQuestionTable.SalesId == SalesTable.SalesId
{
formStaticTextControl = GroupQuestion.addControl(FormControlType::StaticText, "DynamicStringControl");
formStaticTextControl.text(strFmt("%1. %2",salesQuestionTable.questionId(),salesQuestionTable.questionName()));
j = 0;
while select * from salesAnswerTable
order by AnswerId
where salesAnswerTable.SalesQuestionRecId == salesQuestionTable.RecId
{
formCheckboxControl = GroupQuestion.addControl(FormControlType::CheckBox,strFmt("chk%1",salesAnswerTable.AnswerId));
formCheckboxControl.label(salesAnswerTable.Name);
formCheckboxControl.dataSource("LagSalesAnswer");
formCheckboxControl.dataField(fieldNum(LagSalesAnswer,SelectValue));
}
}
}
and init() method.
public void init()
{
super();
this.addQuestionAnswerActual();
}
Please help me and give me any idea.
Thank so much
Rainy Huynh.
*This post is locked for comments
I have the same question (0)