[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
How to find out the index of selected left grid colum in a Fix Column (Array Grid)  XML
Forum Index -> Development
Author Message
deftereos

Power User

Joined: 05/05/2011 13:49:24
Messages: 100
Offline

Hello Bjorn,

I have a Fix Column (Array Grid) setup, where when I click on any cell at the right grid a popup windows opens to input values for the selected cell. This functionality is unwanted in the case the user clicks on the left grid.

1) Is any way to find out on which grid (left or right) the user made a selection?

2) I it possible to find the index of selected column of left grid?

3) Is any way to reset the selected column index of the right grid? Setting setColumnIndexOfLastSelection to -1 does not seem to have any impact.

Regards,
Makis

Gerasimos Makis Defteraios

[MSN]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5518
Offline

Hi Makis,

first of all: why not assigning the popupmenu on the right side only.

Example:

Code:
 <t:rowdemobodypane id="g_1" objectbinding="#{d.DemoGridFixColumns2}" >
     <t:row id="g_5" >
         <t:splitpane id="g_6" dividercolor="#00000030" dividerlocation="150" height="100%" width="100%" >
             <t:splitpanesplit id="g_7" >
                 ... left grid ...
             </t:splitpanesplit>
             <t:splitpanesplit id="g_14" >
                 <t:row id="g_15" >
                     <t:arraygrid id="g_16" border="0" borderheight="0" borderwidth="0" height="100%" horizontalscrollmode="always" multiselect="true" objectbinding="#{d.DemoGridFixColumns2.grid}" rowpopupmenu="RIGHTGRID" sbvisibleamount="30" width="100%;200" />
                 </t:row>
             </t:splitpanesplit>
         </t:splitpane>
     </t:row>
 </t:rowdemobodypane>
 <t:popupmenu id="RIGHTGRID" >
     <t:menuitem id="g_18" command="CLEAR" text="Clear" />
 </t:popupmenu>
 
 


The POPUPMENU "RIGHTGRID" will only show up ion the grid where it is defined.

Kind regards! Björn

Björn Müller, CaptainCasa GmbH
deftereos

Power User

Joined: 05/05/2011 13:49:24
Messages: 100
Offline

Hi Bjorn,

See I already have the functionality pointed out by you as a popupmenu but performing something else.

Since my app is used with touch screen, it is difficult for users to work with right click, opening the popupmenu and then proceed with a menuitem selection.

What I have implement is that a single click on a right grid cell, opens a pop up window in which they can enter several values. This is something that I don't want in case the user clicks on any cell of the left grid

Any idea how to cut this off?

Regards,


Gerasimos Makis Defteraios

[MSN]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5518
Offline

Hi Makis,

OK... - there is a way to find out, but it's not totally straight forward:

Any selection in the grid is done by calling:

Code:
 FIXGRIDBinding.onGridAction(ActionEvent ...)
 


You now can override this method for your grids (there are two FIXGRIDListbinding in your code - which are connected). In your implementation you first part the information which one is the active grid in youd page bean. Then you call the super.onGridAciton(...) method.

Now you can ask for the grid which was the one to initiate the current event.

Kind regards! Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team