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. lua进阶(一)

    第一章 概览     1.chunks              chunks是一系列语句, lua执行的每一块语句,比如一个文件或者交互模式下的每一行都是一个chunks.      2.全局变量 ...

  2. C# 查询Windows Service 信息 ,所在目录 启动状态

    1.WMI简介WMI是英文Windows Management Instrumentation的简写,它的功能主要是:访问本地主机的一些信息和服务,可以管理远程计算机(当然你必须要拥有足够的权限),比 ...

  3. programming ruby

    ri #rdoc reader attr_reader attr_writer @@xx 类变量都是私有的 def 类名.xx end 类方法 [1,3,5,7].inject(0){|sum,e| ...

  4. JQuery中ajax跨域问题

    var url = "http://apis.juhe.cn/idcard/index?key=e0a6277420506b2816b82f7d7821976c&cardno=&qu ...

  5. PAT乙级真题1003. 我要通过!(20)(解题)

    “答案正确”是自动判题系统给出的最令人欢喜的回复.本题属于PAT的“答案正确”大派送 —— 只要读入的字符串满足下列条件,系统就输出“答案正确”,否则输出“答案错误”. 得到“答案正确”的条件是: 1 ...

  6. Datastage数据装载报错:Consumed more than 1000000 bytes looking for record delimiter

    使用Datastage装载数据时报错如下图: 使用ds进行数据传输时,出现上述问题,最终找到了问题的原因: 我所使用的数据文件比较大,上传到服务器的时候传了80%就出现服务器存储空间不够,我删除以前的 ...

  7. SpringMVC综合使用手机管理系统Controller层开发

    1. beans.xml的配置 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns=&qu ...

  8. Android HTTP session && cookie

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

  9. 基于opencv 的图片模糊判断代码

    #include"cv.h"  #include"highgui.h"  #include<iostream>  using namespace s ...

  10. mac os x 系统安装 genymotion android 模拟器

    如果你有 apk 文件 想 运行一下看看 ,但是又没有  android 设备 ,那么 genymotion 将会是一个  很好的解决方案. 1.安装 下载链接: https://cloud.geny ...