Announcement

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

    not select a record when doing right click on listgrid

    Hi,

    I am using smartgwt 3.0.

    I found that right clicking a record on listgrid will select the record and get the original selected record get unselected.
    However, most of our users are more familiar with that right click should not change any selection.

    Is there anyway to disable this behavior?

    Thanks

    #2
    Have you tried implementing the rowContextClick() method? In here there should be a way to get the lastSelectedRecord, or you could set up a global variable to store your original selection, then use the setSelectedRecord(<<originalSelection>>). It is more of a work-around not a disabling of the behavior, but its worth a try.

    I don't know what the implications would be as far as what you are doing with the right-click, or if the actions in the right-click will take place on the record that is selected or the record that you right-clicked.

    Comment


      #3
      Trying to do the same thing with right click

      I need to do the same thing where I want the right click to bring up the context menu on the row that was right-clicked but I do not want the currently selected record(s) to change due to the right click.

      I have not found anyway to disable selection for the right click which would solve the problem nicely.

      Currently I have an ugly work-around where I save the selected record(s) handle the context menu action and then reselect the previous selected record(s).

      Is there any better way to have right-click selection style be NONE? (but only right click, I still need left click to have selection enabled).

      Comment


        #4
        We would recommend not trying to prevent selection on right click. The most common applications that users encounter will change selection on right click and the right click action will affect the selected records.

        If you have some action that doesn't work on the selected records, we would recommend not putting that on a context menu, and making a button or toolbar for it instead.

        Comment


          #5
          Good Idea.

          That sounds like a reasonable plan to follow. Thanks for the advice.

          Comment


            #6
            Diretctory trees

            Hi Isomorphic,

            In general, if we take any directory explorer implementations in any Operating System or any other standard softwares, right-click will not spoil the selected record. The right-clicked record will have a different style altogether to uniquely identify those records.

            Is there any way to achieve such behavior using smartgwt?

            FYI, I am using smartgwt 3.0

            Comment

            Working...
            X