CheckBoxList 的一种使用方式

来源:互联网 发布:mac怎么裁剪视频 编辑:程序博客网 时间:2024/06/05 18:00
<tr>

           <tdwidth="11%">

           </td>

           <tdcolspan="3" nowrap="nowrap">

               <tableid="tblChooseToSign"width="100%">

<tr></tr>

                   <tr>

                       <tdwidth="25%" nowrap>

                           <inputid="btnChooseToSign"type="button"value="点击会签至其他单位"onclick="javascript:ChooseToSign(this);"runat="server"style="width: 180px;

                                cursor: hand;"/>&nbsp;&nbsp;

                       </td>

                       <tdwidth="75%">

                       </td>

                   </tr>

               </table>

           </td>

       </tr>

       <tr>

           <tdnowrap="noWrap">

               <asp:LabelID="lblChooseToSign"runat="server"Text="会签其他单位"style="display:none"></asp:Label>

               <br/>

               <asp:LabelID="Label1" runat="server"ForeColor="Red"Style="display: none"Text="(请勿选取自己部门主管)"></asp:Label></td>

           <tdcolspan="3">

               <divid="divChooseToSign"style="overflow-y: scroll; overflow-x:hidden; width: 90%; height: 200px; border: solid 1px #999; padding: 5px; background-color: #eee; display:none">

                   <asp:CheckBoxListID="CheckBoxList_Fac"runat="server"RepeatDirection="Horizontal"

                       RepeatColumns="5">

                   </asp:CheckBoxList>

               </div>

           </td>

       </tr>

              //点击会签其他单位后才显示签核人列表

                   function ChooseToSign(obj)

                   {

                      try

                       {

                           document.getElementById("tblChooseToSign").style.display="none";

                           document.getElementById("divChooseToSign").style.display="block";

                           document.getElementById("lblChooseToSign").style.display="block";

                           document.getElementById("Label1").style.display="block";

                         

                       }

                      catch(e){

                           document.getElementById("tblChooseToSign").style.display="none";

                           document.getElementById("divChooseToSign").style.display="block";

                           document.getElementById("lblChooseToSign").style.display="block";

                           document.getElementById("Label1").style.display="block";

                       }

                     

                   }

DataSet DS_Fac = pr_c.getAllFac();//会签单位主管

     //会签单位主管

           this.CheckBoxList_Fac.DataSource = DS_Fac;

           this.CheckBoxList_Fac.DataTextField ="ITEM_NAME";

           this.CheckBoxList_Fac.DataValueField ="ITEM_VALUE";

           this.CheckBoxList_Fac.DataBind();

原创粉丝点击