Problem with Table control value update

Hi,

I have a table control on form. When I put some value in control and save, its working fine, but when again change the value, without changing focus from that control, system crashes.

Did anyone else, gone through the same problem, or anyone have any solution for that.

Thanks in advance…

Hello Sir,

Please check this example so you will get your answer.

Form Method -

===============================================

public class FormRun extends ObjectRun
{
// form level variables to store control values.
Gender gender;
TransDate dob;

#define.CurrentVersion(1)
#localmacro.CurrentList
gender,
dob
#endmacro
}


public void initParmDefault()
{
;
// gender::Male;
return ;

}


public void init()
{

super();
xSysLastValue::getLast(this);
cmbGender.selection(gender);
dateOfBirth.dateValue(dob);

}


public void close()
{

super();
xSysLastValue::saveLast(this);

}


public boolean unpack(container packedClass)
{
Integer version = conpeek(packedClass,1);

switch (version)
{
case #CurrentVersion:
[version,#CurrentList] = packedClass;
break;

default:
return false;
}

return true;
}


public container pack()
{
;
gender = cmbGender.selection();
dob = str2Date(dateOfBirth.valueStr(), 1);
return [#CurrentVersion,#CurrentList];

}


private userId lastValueUserId()
{
return curUserId();
}

========================================================

private UtilElementType lastValueType()
{
return UtilElementType::Form;
}


private identifierName lastValueElementName()
{
return this.name();
}


private identifierName lastValueDesignName()
{
return “”;
}


dataAreaId lastValueDataAreaId()
{
return curext();
}

================================================================

Form Controls -

=================================================================

EDT control name Auto declaration Control Type

TransDate dateOfBirth Yes Date

  • cmbGender Yes ComboBox

==================================================================

Regards

Arun Garg

Hi Arun,

Sorry, u r not getting my question.

In my form, I added the Table type control and programmatically adding cells(rows and columns) in that table.

Getting values from cells, I am updating the temporary table, which I am using on the same form in upper section.

Its working fine, when I am putting value in cell and press tab, or focus to other place by mouse, but when I save the value without losing focus from that cell, it makes the value unvisible, and as soon as I press tab, it again shows the value.