public function getSortList(){
        $arr = array();
        $arr[0]['id']=0;
        $arr[0]['name']="否";
        $arr[1]['id']=1;
        $arr[1]['name']="是";
        return CHtml::listData($arr, "id", "name");
        //return CHtml::radioButtonList('issort','1', $arr);
    }
<div class="row">
		<?php echo $form->labelEx($model,'issort'); ?>
		<?php echo $form->radioButtonList($model,'issort', Menu::model()->getSortList(),array('separator'=>'','template'=>'<span style="float:left;" class="radio">{input} {label}</span>')); ?>
		<?php echo $form->error($model,'issort'); ?>
	</div>

  

<style>
.radio{width:40px;}
.radio input{ float: left;}
.radio label{ float: left;margin-left:2px;}
</style>

CHtml::radioButtonList的更多相关文章

  1. MVC通过UIHint和自定义视图显示RadioButtonList

    在Product类中有一个显示删除状态的属性DelFlag,在编辑视图页,对于所有的删除状态以RadioButtonList显示出来,如果RadioButtonList选项的value值与当前mode ...

  2. 初学ReactJS,写了一个RadioButtonList组件

     1 <!DOCTYPE html>  2 <html>  3 <head>  4     <title>React Demo</title> ...

  3. Jquery 操作CheckBox ,RadioButtonList,DropDownList

    Jquery版本2.1.4 CheckBox 1.获取值: $("#chb").prop("checked"); RadioButtonList 1.获取值: ...

  4. jquery给net里面的RadioButtonList添加选项改变事件

    <script type="text/JavaScript" src="../../../JS/jQuery-1.4.1.min.js"></ ...

  5. RadioButtonList 属性设置

    RadioButtonList 属性里有RepeatDirection 设为Horizontal

  6. RadioButtonList的使用

    前台绑定: <asp:RadioButtonList ID="hlBatchYuJi" runat="server" RepeatColumns=&quo ...

  7. js判断radiobuttonlist的选中值显示/隐藏其它模块

    <script> $(function () { var SelectVal = $("input[name='rblGJS']:checked").val(); if ...

  8. DropDownList的使用,RadioButtonList的使用

    DropDownList的使用之从后台动态获取值 前端aspx代码如下 <asp:DropDownList ID="DDLTypeID" runat="server ...

  9. RadioButtonList单选和RequiredFieldValidator验证是否选中

    <asp:RadioButtonList ID="Radio2" RepeatDirection="Horizontal" runat="ser ...

随机推荐

  1. 老外写的在桌面添加快捷方式(DELPHI XE5 ANDROID)

    UsesAndroidapi.JNI.GraphicsContentViewText, FMX.Helpers.Android,Androidapi.JNI.JavaTypes, FMX.Platfo ...

  2. COUNT(*),count(1),COUNT(ALL expression),COUNT(DISTINCT expression) BY Group by

    select column_2,count(column_2) as 'count(column_2)' ,count(column_1) as 'count(column_1)' ,count(*) ...

  3. 利用JQ实现的,高仿 彩虹岛官网导航栏(学习HTML过程中的小记录)

    利用JQ实现的,高仿 彩虹岛官网导航栏(学习HTML过程中的小记录)   作者:王可利(Star·星星) 总结: 今天学习的jQ类库的使用,代码重复的比较多需要完善.严格区分大小写,在 $(" ...

  4. Android HTTP session && cookie

    HTTP协议与状态保持HTTP协议本身是无状态的,这与HTTP协议本来的目的是相符的,客户端只需要简单的向服务器请求下载某些文件,无论是客户端还是服务器都没有必要纪录彼此过去的行为,每一次请求之间都是 ...

  5. 使用IC框架开发跨平台App的备忘录123

    1,关于图标与启动屏幕 icon.png 192x192splash.png 2208x2208 将这两个图片放在resources目录下,在终端执行:ionic resources --iocn - ...

  6. python小算法(一)

    1.长度为m的字符串a,长度为n的字符串b,(m>n) 判断b中的字母是否全在a中? O(n)最小. class Num(object): def getNum(self, m): numLis ...

  7. python数组的使用

    python数组的使用 2010-07-28 17:17 1.Python的数组分三种类型:(1) list 普通的链表,初始化后可以通过特定方法动态增加元素.定义方式:arr = [元素] (2) ...

  8. Swift给每个开发者赢取500万的机会!不看一生后悔。

    [导语] Swift的横空出世,很多有想法的人已经发现其中的蕴含的巨大商机,而很多新手却只是云里雾里,只知道大家最近讨论Swift很欢乐.内行看门道,外行看热闹,说的就是这个理.如果你能把swift用 ...

  9. [转]webrtc学习: 部署stun和turn服务器

    [转]webrtc学习: 部署stun和turn服务器 http://www.cnblogs.com/lingdhox/p/4209659.html webrtc的P2P穿透部分是由libjingle ...

  10. 浅谈dynamic的简单使用用法

    今天看了博客园里面的dynamic用法,我犹豫从来没接触过,今天恶补了一下,把我对dynamic的认识分享了出来,大家一起学习. Visual C# 2010 引入了一个新类型 dynamic. 该类 ...