Announcement

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

    Problem returning null in listgrid.getSelectedRecord()

    Hi,

    we are using smartgwt pro 3.0 version.

    We have set the listgrid selection appearance to CHECKBOX.
    Then in cellclickhandler listgrid.getSelectedRecord() returns null because of selectionAppearance.CHECKBOX.

    But we need both the conditions. How can we accomplish this. Sample code is give below:

    grid.setSelectionType(SelectionStyle.SINGLE);
    grid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
    grid.addCellClickHandler(new CellClickHandler()
    {
    @Override
    public void onCellClick(CellClickEvent event)
    {
    SC.say(""+grid.getSelectedRecord());
    }
    });

    the value returned is null. Needed is record on which click has made.

    Thanks in Advance.

    #2
    You can use event.getRecord() to determine what record was clicked

    Comment

    Working...
    X