EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 09, 2024, 04:41:21 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
Datalist radiobutton
Pages: [
1
]
« previous
next »
Print
Author
Topic: Datalist radiobutton (Read 5956 times)
bdearborn
Newbie
Posts: 19
Datalist radiobutton
«
on:
December 14, 2015, 07:05:38 PM »
Can I override the datalist component so that it will show a radiobutton instead of a checkbox?
Logged
bdearborn
Newbie
Posts: 19
Re: Datalist radiobutton
«
Reply #1 on:
December 14, 2015, 07:06:23 PM »
From JeasyUI Support:
To get a radio button on the left of item, please use the 'formatter' function to define a radio element.
$('#dl').datalist({
textFormatter: function(value,row){
return '<input type="radio" name="name1">' + value;
},
onSelect: function(index,row){
var tr = $(this).datalist('options').finder.getTr(this, index);
tr.find('input[type=radio]')._propAttr('checked', true);
}
})
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...