zoukankan      html  css  js  c++  java
  • 控件数据初始值绑定代码

            /// <summary>
            /// 把ListControl(BulletedList、CheckBoxList、DropDownList、ListBox、RadioButtonList)指定值的行进行选择
            /// </summary>
            /// <param name="DLTarget">要操作的目标</param>
            /// <param name="strValue">值</param>
            public static void SelectItemByValue(ListControl DLTarget, string strValue)
            {
                if (strValue == "")
                    return;


                int iCount = DLTarget.Items.Count;
                for (int i = 0; i < iCount; i++)
                    if (DLTarget.Items[i].Value.Trim() == strValue)
                    {
                        DLTarget.SelectedIndex = i;
                        break;
                    }
                return;
            }


            /// <summary>
            /// 把ListControl(BulletedList、CheckBoxList、DropDownList、ListBox、RadioButtonList)指定名称的行进行选择
            /// </summary>
            /// <param name="DLTarget">要操作的目标</param>
            /// <param name="strName">名称</param>
            public static void SelectItemByName(ListControl DLTarget, string strName)
            {


                int iCount = DLTarget.Items.Count;
                for (int i = 0; i < iCount; i++)
                    if (DLTarget.Items[i].Text == strName)
                    {
                        DLTarget.SelectedIndex = i;
                        break;
                    }
                return;
            }


  • 相关阅读:
    jmeter和ab的对比
    jmeter
    (原)InsightFace及其mxnet代码
    (原)CosFace/AM-Softmax及其mxnet代码
    (原)SphereFace及其pytorch代码
    (原)模型的参数初始化
    (原)python中不同文件之间使用所谓的全局变量
    (原+译)pytorch中保存和载入模型
    (原)torch模型转pytorch模型
    (原+译)使用numpy.savez保存字典后读取的问题
  • 原文地址:https://www.cnblogs.com/dashi/p/4034804.html
Copyright © 2011-2022 走看看