Announcement

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

    How to add Radio Buttons in coulns i.e. ListGridField

    Hi,

    I am very new to GWT and this forum. I want to create a List Grid where Columns can contain Radio buttons, i.e. ListGridField should be allowing user to select values for each row.
    I have seen some examles to add Radio Button to ListGrid that allows to select one of the rows, however not seen example of individual columns having radio button.

    Thanks.


    #2
    Radio buttons are generally a poor choice for editing in a grid, since they are not space-efficient. However, if you want to do it anyway, set listGridField.editorType to RadioGroupItem.

    Comment


      #3
      Thanks for above suggestion, I was able to add Radio button to ListGridField. However I have one issue, this radio button is only visible when particular record is edited. How can I show the radio buton always on.
      please advise.

      Click image for larger version

Name:	RadioButton in grid.PNG
Views:	16
Size:	4.1 KB
ID:	258703

      Comment


        #4
        You would need to either set alwaysShowEditors or use showRecordComponents instead.

        Comment


          #5
          I used showRecordComponents , t did not worked.. when I try alwaysShowEditors it does show radio buttons when selected ( But doesnt show radio buttons for all records ). Also once radio button is visible, grid record looses its selection ( i.e Grid.getSelectedRecord() is getting null).

          Comment


            #6
            Sorry, this information is quite useless in terms of being able to help you. All the approaches we've described work and are shown working in samples. If you are having trouble, you need to show code that we can run, so we can see what's going wrong.

            Comment

            Working...
            X