zoukankan      html  css  js  c++  java
  • 绑定checkedComboBox

    using System;

    namespace CommonLib
    {
    /// <summary>
    /// CommonCode 的摘要说明。
    /// </summary>
    [Serializable]
    public class CommonCode
    {
    private string m_ID = string.Empty;
    private string m_Name = string.Empty;

    /// <summary>
    /// 代码
    /// </summary>
    ///

    public CommonCode()
    {
    }

    public CommonCode(string id,string name)
    {
    this.m_ID = id;
    this.m_Name = name;
    }

    public string ID
    {
    get{return this.m_ID;}
    set{this.m_ID = value;}
    }
    /// <summary>
    /// 名称
    /// </summary>
    public string Name
    {
    get{return this.m_Name;}
    set{this.m_Name = value;}
    }
    }
    }

    public void SetStatusList(List<CommonCode> commonCodes)
    {
    checkedComboBoxEdit1.Properties.Items.Clear();
    LookupEditSetter.Setup(checkedComboBoxEdit1, commonCodes.ToArray(), true);
    }

    //获取值方法

    public List<string> Status
    {
    get
    {
    var v = CanHelper.ob2Str(checkedComboBoxEdit1.EditValue);
    if (string.IsNullOrEmpty(v)) return null;
    var list = v.Split(',');
    return list.ToList();
    }
    set
    {
    checkedComboBoxEdit1.SetEditValue(value == null ? null : string.Join(",", value.ToArray()));
    }
    }

  • 相关阅读:
    smarty语法
    combobox里面显示checkbox
    requirejs打包项目
    datagrid中用tooltip
    combobox默认值为第一个数据,修改为空值
    easyui-textbox高为0
    C++并发编程 异步任务
    C++并发编程 互斥和同步
    C++并发编程 thread
    C++智能指针
  • 原文地址:https://www.cnblogs.com/huzige/p/6547659.html
Copyright © 2011-2022 走看看