Hi,
If you call super() you will change the feeld. That is don't call super if the answer is no.
'Ret' is default false. The result is you retur true if you answer yes and false if you answer no.
public boolean modified()
{
boolean ret;
if (Box::yesNo(sometext,DialogButton::Yes) == DialogButton::Yes)
{
ret = super();
}
return ret;
}
Best Regards
Erik Hansen
________________________________
Fra: Padmaja Iyingar [mailto:[EMAIL PROTECTED]
Sendt: fr 14-01-2005 01:48
Til: [email protected]
Cc: [email protected]
Emne: [development-axapta] Modified() with Text Box
Hi,
I am not able to get it working. I hope someone will help me.
I have a grid and one of fields is "dateEdit". I have a modified method on the dateEdit field. Say, if the user tries to modify the date, I am prompting a messageBox with Yes or No button.
What I would like to have is, if user select 'No' option, the value should not be modified to new value , it should retain the old value. I know its something to do with placing super() call.
But I could not make it working.
Pls find a piece of my code.
/****************************************************************************/
public boolean modified()
{
boolean ret;
ret = super();
if( Box::yesNo(sometext,DialogButton::Yes) == DialogButton::Yes)
{
change the date;
}
else {
don't change the date.
}
return ret;
}
but if I select yes or no also, the date is getting modified. How can I prevent modifying the date if the user selects 'No'.
Can any one help me?. or do we need to write a validatewrite method ......
Thanks in advance
-Padmaja
/***********************************************************************/
---------------------------------
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
[Non-text portions of this message have been removed]
Yahoo! Groups Links
[Non-text portions of this message have been removed]
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 the Yahoo! Terms of Service.

