Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ContextMenuItem Showing outside record Click

    Need a help from you guys, while i am selecting a record and right clicking that record it will shows the contextMenuItem. this is expected behavior but clicking outside of the record it will also shows the contextMenuItem. this is because of that event belongs to the grid(grid.addRowContextClickHandler()). is there any option to restrict the contextMenuItem when clicking outside of the record. or is there any option to change that event belongs to record based instead of grid or this is expected GWT behavior. i have attached screenshots for your reference. Kindly look into Context_2 and Context_3 screenshots that is selected outside of record click. .kindly suggest your comments.

    Attached Files

    #2
    rowContextClick only fires when you click on an actual record. You may have done something else, like assigned a contextMenu to the grid or to its body.

    Whatever you were trying to attach, it didn't work - apparently your files were corrupt in some way.

    Comment


      #3
      Hi,

      Thanks for your response.

      In our project, the context menu is appeared on top & bottom of the grid . This should not be the case the context menu appearing. Please refer the below screenshot that shows the context menu appeared top & bottom which is outside the record. Is there any way to get rid of this ?

      Click image for larger version

Name:	Grid_contextMenu.PNG
Views:	180
Size:	131.0 KB
ID:	251791

      Currently the context menu assigned to the grid alone from the below code snippet
      Code:
              grid.addRowContextClickHandler(new RowContextClickHandler() {
      
                  @Override
                  public void onRowContextClick(RowContextClickEvent event) {
                      if(event.getRecord() != null){
                      showGridContextMenu(event);
                      }
                  }
              });

      Comment


        #4
        Hi jkotte,

        at least to me it's not clear on which records you were clicking. The top/bottom ones? Or the focused blue-one in the middle?

        Best regards
        Blama

        Comment


          #5
          We are likewise unsure what you mean. Again, rowContextClick fires only for a click on a record. If you are claiming some other behavior, we need a way to reproduce it in order to determine whether it's a framework issue, or just an issue in your code, for example, setting a contextMenu for the whole grid (as we mentioned above).

          Comment


            #6
            Hi ,
            Thanks for your response. for more Convenient i have attached screen cast ( https://www.screencast.com/t/TvSmfnHpUffH ) for your reference what is exactly happening. i am waiting for your valuable response.
            Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.

            Comment


              #7
              Thanks for the screencast. Our answer above (#5) has your next steps.

              Comment


                #8
                Thanks for reply, can you confirm this behavior caused because of framework issue.

                Comment


                  #9
                  Of course not - we've just explained, twice, how it is more likely to be a mistake on your end. Please reread our previous posts, and proceed as indicated.

                  Comment


                    #10
                    Apologies for asking again.

                    Is there any way to apply the context menu on record click rather than whole grid ?

                    Comment


                      #11
                      See our very first reply - #2 - that's actually how rowContextClick works. It only fires when you click an actual record.

                      You appear to have done something *else* that causes this contextMenu to appear, but we cannot figure out what you've done wrong when all you've posted is screenshots (debuggers do not work with screenshots). But we actually provided a theory of what you've done wrong, even so (again this is in our first reply - #2).

                      If you believe that, despite all this, you've discovered a framework issue, what we need is a minimal, ready-to-run test case clearly demonstrating a framework issue.

                      Please do not post again on this topic unless you have clear evidence of a framework issue. Thanks.

                      Comment

                      Working...
                      X