Skip to Content
0

How to get radio button property(from column) from sap.m.table?

Jun 07, 2017 at 02:17 PM

144

avatar image

Hi,

I am using a sap.m.Table. In the table, I have two columns. Radio button in one column and employee name in other column. Now I should restrict the user to select only one radio button in the column. Can anyone guide me?

Regards

Karthik S

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Akhilesh Upadhyay Jun 07, 2017 at 02:50 PM
1

Hi,

what about mode="SingleSelect" in table ?

you can avoid first column for radiobutton and introduce mode property as above in your table, by default radio button will be shown against each row.

check if it is ok for your business scenario.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

The requirement is like User can select any number of employees by keeping one employee has main employee(Like primary key).

Regards

Karthik S

0

didnt get you sorry,

can you please paste your screenshot to understand your scenario.

0
Dennis Seah
Jun 07, 2017 at 07:37 PM
0

HI Karthik

Would this help?

http://jsbin.com/guraya/edit?js,output

Thanks

Dennis

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Dennis,

Thanks. Instead of Radio button, I need check box. I tried with check box in the table first column. But I am not able to get the Check Box property value. I need to validate how many check box is selected by the User. I need to alert User if no check box is selected and the selection is more than one.

Thanks

Karthik S

0

Hi Karthik,

Dennis has already done most of the work for you. I have modified same code by Dennis to add the checkbox as your requirement. Just convert radio button to checkbox and modify model and bind the selected property to checkbox.

0
0