Akash,
You should store your checkbox value into a variable. Another solution is to create a
new field at CommissionTrans table and then set "SaveContents" property to "No". You
now may override modified method at that new field.
The first solution, you have to add a code, for example is like this:
Classdeclaration:
map oMark;
Init:
oMark = new map(types::Integer,types::Integer);
edit NoYes markTrans(boolean set,
CommissionTrans
_commissionTrans,
NoYes _markTrans)
{
if (set)
{
element.lock();
if (_markTrans == NoYes::Yes)
{
BalanceAmount += _CommissionTrans.AmountMST;
}
else
{
BalanceAmount -= _CommissionTrans.AmountMST;
}
element.unLock();
this.refresh();
oMark.insert(_commissionTrans.RecId,_markTrans);
}
else
{
if (oMark.exists(_commissionTrans.RecId))
{
_markTrans = oMark.lookup(_commissionTrans.RecId);
}
}
return _MarkTrans;
}
Regards,
Sonny Wibawa Adi
bmp_thydatacenter_dk <[EMAIL PROTECTED]> wrote:
I think the problem is that the third parameter _markTrans only has
a defined content if the first parameter is true.
You should have a global variable in the classdeclaration of the
form holding the current status of the checkbox. Only access and use
the _markTrans parameter to read the new value in the field if the
first parameter is true. Then you can tranfer the new value to you
global variable, which is the one the method is returning.
Best regards,
Bj�rn M�ller Pedersen
Thy Data Center Development A/S
edit NoYes markTrans(boolean _set,
CommissionTrans _commissionTrans,
NoYes _markTrans)
{
if (set)
{
markTrans = _markTrans;
element.lock();
if (_markTrans == NoYes::Yes)
{
balanceAmount += _CommissionTrans.AmountMST;
}
else
{
balanceAmount -= _CommissionTrans.AmountMST;
}
element.unLock();
this.refresh();
}
return markTrans;
}
--- In [EMAIL PROTECTED], akash malohatra
<[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have problem in implimenting this Edit method. When
> i am trying to click the check box. It never checks ,
> still its editable...whats wrong in code....
>
>
> edit NoYes markTrans(boolean set,
> CommissionTrans
> _commissionTrans,
> NoYes _markTrans)
> {
>
> if (set)
> {
> element.lock();
> if (_markTrans == NoYes::Yes)
> {
> BalanceAmount += _CommissionTrans.AmountMST;
> }
> else
> {
>
> BalanceAmount -= _CommissionTrans.AmountMST;
> }
> element.unLock();
> this.refresh();
> }
>
> return _MarkTrans;
> }
>
> This method is in the Datasource of the form . and
> this is a checkbox in my grid.
>
> Thanks
> Akash
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/