1

SmartGWT has this property for a TreeGrid object:

employeeTreeGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX); 

This by default 'prepends' every nodes (including root) with checkbox. (Just making myself clear.)

Also, I am aware of this similar solved question: GWT tree with checkbox:How to get all checked tree items?

However, I do not seek this kind of solution.. What I'm looking for is a more efficient way, where I don't have to loop through 1000 items.

Is there any way to do this, if possible, using the widget I am using now? If not, is there any other way, using other widget?

Thank you very much!

1 Answer 1

3

I think as you use SelectionAppearance.CHECKBOX you tell to the grid that the selected records are marked by the checkbox field value. So every time you check one you select a record. You can get the set of selected records by either getSelection() method or getSelectedRecords(boolean) because of deprecation of the previuous one. You can have a look at the code of this example of the smartgwt showcase.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.