cancel
Showing results for 
Search instead for 
Did you mean: 

Checkbox used for single selection in table

Former Member
0 Kudos

Hi All,

my project manager seems to really like the idea to use checkboxes to indicate the selection in table. The situation is this: I put checkboxes in the first column of a table that is supposed to be used in single selection mode, if the user click on a checkbox, the previously selected one should be unchecked.

What I do is to put some code in the action handler of the checkbox' <i>onToggle </i>action to clear the previous selection, it works fine, just one thing: After you click on a checkbox, you see the old checked checkbox and the checkbox that was clicked on both checked at the same time, after that the browser refreshes the whole page, then you get only one checkbox checked, namely the one you clicked on. This looks very strange, especially when I do a little more than just clear the checked checkbox in the action handler.

I guess the (un)checking of the checkbox that is clicked on seems to happen at the client side (browser), fine; but the clearing of other checkboxes can only happen at the server side, which leads to the strange feel.

So is there any better way to use checkbox for single selection in table?

Thanks and Best regards,

Ge

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I would just use the table as it is designed and not waste time with such workarounds.

Armin

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Armin,

Thanks for your advice, I hope this can help me out to convince my project manager to go with the standard design of WD table.

@Abhijeet, thanks very much for your reply.

The reward points are assigned.

Best regards,

Ge

abhijeet_mukkawar
Active Contributor
0 Kudos

Hi,

when you add the checkbox as a columnin table, that time select its type under UI element as CheckBoxgroup, this will solve all your worries and will let you free from writing code of clearing the previously selected checkbox.

since this is a group , you can select only one checkbox at a time.

take a look at this:

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/656442a1c4de54e10000000a155106/frameset.htm

hope it helps

regards

Former Member
0 Kudos

Sorry, but this is plain nonsense. You cannot add check box groups as table cell editors and additionally, check box groups allow multiselection.

Armin

abhijeet_mukkawar
Active Contributor
0 Kudos

Armin ,

I agree with you....this is plain nonsense, and also i had though the post is asking about mutiselection so i suggested group(mistake on my part).

he might take use of RadioButtons.So only on selection is possible, without clearing earlier mess.

regards