ContextMenu on JS DataGrid

Mayada Al-Kishtini malkishtini at gmail.com
Wed Mar 1 09:09:46 EST 2017


Good point Andrew! Thank you.

Mayada

-----Original Message-----
From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf
Of Andrew Stolarz
Sent: Wednesday, March 01, 2017 9:01 AM
To: OmnisDev List - English
Subject: Re: ContextMenu on JS DataGrid

Mayada

Another reason not to use the context menu in the JS client is if you ever
want to have mobile clients (ipad/iphones etc) - context menu is not a
desirable end user function.



AS




On 1 March 2017 at 08:13, Mayada Al-Kishtini <malkishtini at gmail.com> wrote:

> Thank you Andrea for testing this and getting back to me.
>
> The grid I'm using has other events handling code behind it, like On
> evClick,evDoubleClick     , I tried to add Quit event handler (Discard
> event) at the end of the click event but still same issue.
> It is not always happening, the behavior is inconsistent, one time the 
> context menu close on another click event and the next two times or 
> more it doesn't and so on.
>
> It might be worth mentioning that the data grid I'm using (is another 
> js
> form) that appears in a subform inside my main JF form, that could 
> relate to the behavior I'm seeing who knows.
>
> Well I decided to not use the context menu for what I'm doing now to 
> avoid this behavior.
>
> Thank you,
> Mayada
>
>
> -----Original Message-----
> From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On 
> Behalf Of Andrea Zen
> Sent: Wednesday, March 01, 2017 3:10 AM
> To: OmnisDev List - English
> Subject: RE: ContextMenu on JS DataGrid
>
> I've just tried it in my webapp (made and running on Omnis 6.1.2.1), I 
> also use a context menu in a data grid, it works well: right click on 
> the grid opens the menu, single click on the grid closes it, another 
> single click on the grid selects a line.
>
> Andrea Zen
>
>
> > -----Original Message-----
> > From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com] 
> > On Behalf Of Mayada Al-Kishtini
> > Sent: Tuesday, February 28, 2017 7:20 PM
> > To: 'OmnisDev List - English' <omnisdev-en at lists.omnis-dev.com>
> > Subject: ContextMenu on JS DataGrid
> >
> > Hi All,
> >
> > I have a data grid on a JS form and I'm trying to add a context menu 
> > to
> it.
> >
> > My issue is that when I right click on a line in the grid, the menu 
> > opens, but when I don't click on any line from the menu and then I 
> > click on another line from the grid, the context menu will remain open.
> > Is there a way to close the context menu when clicking on another 
> > line on the grid?
> >
> > Thank you,
> > Mayada
> > -----Original Message-----
> > From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com] 
> > On Behalf Of Andrea Zen
> > Sent: Tuesday, February 28, 2017 3:57 AM
> > To: OmnisDev List - English
> > Subject: RE: Store object reference in a row column, from inside the 
> > object itself
> >
> > $objref works, thanks! (btw, I see it is mentioned in the 
> > Programming Manual, but not in the Omnis Help)
> >
> > Andrea Zen
> >
> >
> > > -----Original Message-----
> > > From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com]
> > On
> > > Behalf Of Mayada Al-Kishtini
> > > Sent: Monday, February 27, 2017 6:23 PM
> > > To: 'OmnisDev List - English' <omnisdev-en at lists.omnis-dev.com>
> > > Subject: RE: Store object reference in a row column, from inside 
> > > the object itself
> > >
> > > Andrea,
> > >
> > > Try this:
> > >
> > > Do iv_ObjectRef.$testMethod($cinst. objref())
> > >
> > > Then in your $testMethod, have a parm of type objectref > 
> > > pObjectRef
> > >
> > > Do lv_Row.$define()
> > > Do lv_Row.$cols.$add('REFERENCE';kObjectref)
> > > Do lv_Row.REFERENCE.$assign(pObjectRef)
> > >
> > > Hope that helps,
> > > Mayada
> > >
> > > -----Original Message-----
> > > From: Mayada Al-Kishtini [mailto:malkishtini at gmail.com]
> > > Sent: Monday, February 27, 2017 12:15 PM
> > > To: 'OmnisDev List - English'
> > > Subject: RE: Store object reference in a row column, from inside 
> > > the object itself
> > >
> > > Hi Andrea,
> > >
> > > Try $cinst.$objref().
> > >
> > > Mayada
> > >
> > > -----Original Message-----
> > > From: omnisdev-en [mailto:omnisdev-en-bounces at lists.omnis-dev.com]
> > On
> > > Behalf Of Andrea Zen
> > > Sent: Monday, February 27, 2017 12:08 PM
> > > To: OmnisDev List - English
> > > Subject: Store object reference in a row column, from inside the 
> > > object itself
> > >
> > > Hi all,
> > > how can I store in a row column a reference to the current object, 
> > > being inside the object itself?
> > > For example:
> > >
> > > Do $objects.TEST_OBJ.$newref() Returns iv_ObjectRef Do
> > > iv_ObjectRef.$testMethod()
> > >
> > > Now, inside $testMethod():
> > >
> > > Do lv_Row.$define()
> > > Do lv_Row.$cols.$add('REFERENCE';kObjectref)
> > > Do lv_Row.REFERENCE.$assign(XXX)
> > >
> > > What should I use instead of XXX? I've tried $cinst, 
> > > $cinst.$ref...doesn't
> > work.
> > >
> > > Andrea Zen
> > >
> > __________________________________________________________
> > > ___
> > > Manage your list subscriptions at http://lists.omnis-dev.com
> > >
> > >
> > >
> > __________________________________________________________
> > > ___
> > > Manage your list subscriptions at http://lists.omnis-dev.com
> >
> > __________________________________________________________
> > ___
> > Manage your list subscriptions at http://lists.omnis-dev.com
> >
> >
> > __________________________________________________________
> > ___
> > Manage your list subscriptions at http://lists.omnis-dev.com
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
>
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
>
_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com





More information about the omnisdev-en mailing list