Hi!

Here's an example of code you could put in validate() method of the 
dataSource's field.

boolean ret = super();

if (ret && Box::yesNo("Really really really want to check that box?", 
DialogButton::No) == DialogButton::No) {
    ret = false;
}

return ret;

That should do the trick.

Regards,

Steeve... 


-----Message d'origine-----
De : Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] De la 
part de drescher_r
Envoyé : 27 février 2006 04:59
À : Axapta-Knowledge-Village@yahoogroups.com
Objet : [Axapta-Knowledge-Village] Re: Question if checkbox is about to be 
changed

--- In Axapta-Knowledge-Village@yahoogroups.com, Paulius
<[EMAIL PROTECTED]> wrote:

what does validate() do? 
in fact, i want to PREVENT that someone changes the box in the form,
it's no use if the box has already changed and the datasource just
rejects the change on the table when the OK button isn't klicked..

my approach would be

1. Checkbox is changed
2. check the new state of the box
3. show a window which informs about the new state
4. if OK is pressed, accept the new state, 
   if cancel is pressed, revert to the old state.

i'm kinda confused, this job should be quite easy...

>
> 
> have you tried validate() on dataroce field?
> 
> --- drescher_r <[EMAIL PROTECTED]> wrote:
> 
> > Hi! 
> > 
> > I'm working on a customer's request to secure a
> > checkbox. 
> > It's in the InventTable-Form and if the user clicks
> > the checkbox, a
> > messagebox should appear and inform the user, that
> > checking/unchecking
> > the option results in something. If he clicks on OK,
> > the change is
> > submitted, else it's discarded..
> > 
> > I tried putting in a clicked method, that checks the
> > state of the box,
> > creates an info about the state change and then
> > calls super()...
> > but it doesn't react! i tried modified-method and
> > still no reaction.
> > 
> > when i used the modified method of the datasource,
> > it did react, but
> > of course that's not an option for the method should
> > prevent changing
> > the box..
> > 
> > any ideas why it doesn't work?
> > Robert
> > 
> > 
> > 
> > 
> > 
> 
> 
> Paulius Cerniauskas
> ICQ: 280959446
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com
>






Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends. 
Yahoo! Groups Links



 







Sharing the knowledge on Axapta.
Visit www.frappr.com/axapta for axapta friends. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Axapta-Knowledge-Village/

<*> 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/
 


Reply via email to