Working on a custom validator for a dataGrid itemEditor. Have 2 questions:

  1. Is there a way to prevent loosing focus while validation fails. I know I could handle the itemEditEnd event and use event.preventDefault() to disallow ending the edit, but I would prefer to do this at the DataGridColumn level and not on DataGrid level - together with the itemEditor validation.
  2. Similarily I would like to hook in before the edit begins and do some checks and possibly prevent the edit, from within the itemEditor. Again, I know I can use itemEditBegin and Beginning on a DataGrid level, but I would prefer this on GridColumn level. I have played with calling a function from the itemEditor (code in the creationComplete handler)...something like:

    if ( ! canWeEditThisItem(this.data))
        parentDocument.dg.destroyItemEditor();

    It works but I am a bit cautious because basically the itemEditor is "committing suicide". Could create some memory problems or what have you... Has anyone done something similar? Any recommendations on a good practise?

 Thanks a bunch

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to