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. Windos中无法删除桌面IE图标的解决方法

    解决方法其实并不难,打开注册表,转到如下图的位置,详细地址在图片最下面: 需要注意的是,你需要在NameSpace中逐个查看各个项目的数据值,显示为数据值为Internet Explorer的项目即为 ...

  2. 【推介】GitHub

    隆重推介:GitHub(https://github.com/) 作为开源代码库以及版本控制系统,Github拥有140多万开发者用户. 随着越来越多的应用程序转移到了云上,Github已经成为了管理 ...

  3. php网页,想弹出对话框, 消息框 简单代码

    php网页,想弹出对话框, 消息框 简单代码 <?php echo "<script language=\"JavaScript\">alert(\&q ...

  4. Windows API 的数据类型与 Delphi 数据类型对照表

    Windows 数据类型 Delphi 数据类型 描述 LPSTR PAnsiChar 字符串指针 LPCSTR PAnsiChar 字符串指针 DWORD LongWord 整数 BOOL Long ...

  5. ADOMD连接SSAS和Mondrian,rex的终结者

    前传 公司使用Mondrian作为OLAP服务器,于是,不得不适用Java开源的Rex进行客户端连接,用了一段时间,实在无法忍受rex的笨拙,于是乎,一直希望有一个工具能够连接替代它. 周末闲来无事, ...

  6. MIFARE系列3《卡能源和数据传递》

    在MIFARE卡中,能量和数据通过天线传输,卡中天线为几匝线圈,直接连接到芯片上,不再需要额外的组件.线圈嵌入塑料中,形成了一个无源的非接触卡. 读卡器向IC发一组固定频率的电磁波,卡内有一个IC串联 ...

  7. strcpy/strlen/strcat/strcmp面试总结

    <strcpy拷贝越界问题> 一. 程序一 #include<stdio.h> #include<string.h> void main() { char s[]= ...

  8. AsyncTask和Handler两种异步方式的实现和区别比较

    1  AsyncTask实现的原理,和适用的优缺点 AsyncTask,是android提供的轻量级的异步类,可以直接继承AsyncTask,在类中实现异步操作,并提供接口反馈当前异步执行的程度(可以 ...

  9. golang的函数

    在golang中, 函数是第一类值(first-class object), 即函数可以赋值与被赋值. 换言之, 函数也可以作为ReceiverType, 定义自己的method. 实例: http. ...

  10. 将meteor部署在自己服务器上的简易方法

    有meteor-up等众多工具,如果你不喜欢它们,可以尝试如下方法,自由控制. 1,创建及打包项目 meteor create newapp meteor build . 2,上传 将bunder.t ...