DevExpress

RibbonReportDesigner   XtraReport的报表设计器

http://www.doc88.com/p-395360633164.html   对各个控件的功能有个大致的介绍

http://www.cnblogs.com/zzh1236/archive/2012/07/14.html  使用PopupContainerEdit和PopupContainerControl制作下拉菜单树小记(转)

 http://hi.baidu.com/olympic0408/item/fa27c28e299344d55e0ec137    只显示年、月的DateEdit控件

http://www.cnblogs.com/axing/archive/2013/07/19/3201066.html   只显示年、月的DateEdit控件

 

http://www.csframework.com/archive/2/arc-2-20110713-1691.htm GridView列头添加CheckBox控件实现全选功能(可能不是DevExpress的)

http://blog.163.com/yanlicheng0719@126/blog/static/165026808201192810345518/

http://download.youkuaiyun.com/detail/qq81867376/4434784

http://itworktor.blog.163.com/blog/static/1752030292010119140909/

http://www.evget.com/zh-CN/Info/catalog/16768.html    这个说是DevExpress的多选OK,不过没有弄过

 http://www.csframework.com/archive/2/arc-2-20110322-1217.htm    GridPopupContainerEdit

 

 

 

 

private void Form1_Load(object sender, EventArgs e)
        {
            repositoryItemPopupContainerEdit1.QueryPopUp += new CancelEventHandler(repositoryItemPopupContainerEdit1_QueryPopUp);
            repositoryItemPopupContainerEdit1.QueryResultValue += new DevExpress.XtraEditors.Controls.QueryResultValueEventHandler(repositoryItemPopupContainerEdit1_QueryResultValue);
        }

        void repositoryItemPopupContainerEdit1_QueryResultValue(object sender, DevExpress.XtraEditors.Controls.QueryResultValueEventArgs e)
        {
            try
            {//将选中的项目组合成字符串
                string oldValue = e.Value.ToString();
                string newValue = "";
                foreach (CheckedListBoxItem o in chkStoveNoList.CheckedItems)
                {
                    newValue = newValue + "," + o.Value;
                }

                if (newValue.ToString().Length > 0)
                    newValue = newValue.ToString().Substring(1, newValue.ToString().Length - 1);

                if (oldValue != newValue)
                {
                    e.Value = newValue;
                }
            }
            catch { }
        }

        void repositoryItemPopupContainerEdit1_QueryPopUp(object sender, CancelEventArgs e)
        {
            //分解字符串,在选择列表内打勾显示
            popCCStoveNo.Width = (sender as PopupContainerEdit).Width;
            if (gridView1.IsValidRowHandle(gridView1.FocusedRowHandle))
            {
                DataRow row = gridView1.GetDataRow(gridView1.FocusedRowHandle);
                string stoveNo = "," + row["StoveNo"].ToString() + ",";

                //插入不存在炉号
                string[] NOs = stoveNo.Split(new char[] { char.Parse(",") }, StringSplitOptions.RemoveEmptyEntries);
                foreach (string no in NOs)
                {
                    if (!StoveNoExists(chkStoveNoList.Items, no))
                        chkStoveNoList.Items.Add(no);
                }

                int i = 0;
                foreach (CheckedListBoxItem no in chkStoveNoList.Items)
                {
                    bool exists = stoveNo.IndexOf("," + no.Value + ",") >= 0;
                    chkStoveNoList.SetItemChecked(i, exists); //打勾显示
                    i++;
                }

                //设置下拉显示高度
                int height = 20 * 10;
                if (chkStoveNoList.Items.Count < 10)
                    height = 20 * chkStoveNoList.Items.Count + 20;
                popCCStoveNo.Height = height;
            }
        }

        private bool StoveNoExists(CheckedListBoxItemCollection items, string no)
        {
            foreach (CheckedListBoxItem item in items)
            {
                if (item.Value.ToString() == no) return true;
            }
            return false;
        }

 

 

 GetDataRecordByNode();
 TreeListNode newNode = treeList.FindNodeByKeyID(node["Id"]);
 System.Data.DataRowView rov = treeList1.GetDataRecordByNode(e.Node) as System.Data.DataRowView;
 rov["code"].ToString().Trim();

 

Ribbon, Toolbar-Menu &Docking => MDI Menu Merging

WinForms\XtraBars\CS\BarTutorials       MDI Menu Merging

 

private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
{
if (e.FocusedRowHandle == 0)
{
for (int i = 0; i < this.gridView1.Columns.Count; i++)
{
this.gridView1.Columns[i].OptionsColumn.AllowEdit = true;
}
}
else
{
for (int i = 0; i < this.gridView1.Columns搜索.Count; i++)
{
this.gridView1.Columns[i].OptionsColumn.AllowEdit = false;
}
}
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值