• 大小: 17.98MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-25
  • 语言: C#
  • 标签: DevExpress  

资源简介

ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit(内附文档、源码、演示)

资源截图

代码片段和文件信息

using DevExpress.XtraGrid.Views.base;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }


        private void Form1_Load(object sender EventArgs e)
        {
            BindDataSource(InitDt());
        }

        #region 绑定一个表格
        private DataTable InitDt()
        {
            DataTable dt = new DataTable(“个人简历“);
            dt.Columns.Add(“id“ typeof(int));
            dt.Columns.Add(“name“ typeof(string));
            dt.Columns.Add(“sex“ typeof(int));
            dt.Columns.Add(“address“ typeof(string));
            dt.Columns.Add(“aihao“ typeof(string));
            dt.Columns.Add(“photo“ typeof(string));
            dt.Rows.Add(new object[]
            { 1 “张三“ 1 “东大街 6 号“ “看书“ ““ });
            dt.Rows.Add(new object[]
            { 1 “王五“ 0 “西大街 2 号“ “上网游戏“ ““ });
            dt.Rows.Add(new object[]
            { 1 “李四“ 1 “南大街 3 号“ “上网逛街“ ““ }); dt.Rows.Add(new object[]
            { 1 “钱八“ 0 “北大街 5 号“ “上网逛街看书游戏“ ““ });
            dt.Rows.Add(new object[]
            { 1 “赵九“ 1 “中大街 1 号“ “看书逛街游戏“ ““ }); return dt;
        }
        #endregion

        #region  gridControl1 绑定数据方法
        private void BindDataSource(DataTable dt)

        {
            //绑定 DataTable
            gridControl1.DataSource = dt;
        }
        #endregion

        private void gridView1_InitNewRow(object sender DevExpress.XtraGrid.Views.Grid.InitNewRowEventArgs e)
        {
            ColumnView View = sender as ColumnView;
            View.SetRowCellValue(e.RowHandle View.Columns[0] gridView1.GetRowCellValue(gridView1.GetRowHandle(gridView1.RowCount - 2) gridView1.Columns[0])); //复制最后一行的数据到新行

            View.SetRowCellValue(e.RowHandle View.Columns[1] gridView1.GetRowCellValue(gridView1.GetRowHandle(gridView1.RowCount - 2) gridView1.Columns[1])); //复制最后一行的数据到新行
        }

        #region 新增按钮事件
        //private void btn_Add_Click(object sender EventArgs e)
        //{
        //    gridView1.AddNewRow();
        //}

        private void btn_Add_Click(object sender EventArgs e)
        {
           
        }

        #endregion

        #region 序号从0开始
        //private void gridView1_CustomDrawRowIndicator(object sender DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
        //{
        //    if (e.Info.IsRowIndicator && e.RowHandle >= 0)
        //    {

        //        e.Info.DisplayText = e.RowHandle.ToString();

        //    }
        //}
        #endregion


        #region 序号从1开始
        /// 
        /// 序号从1开始
        /// 

        ///

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        197  2018-06-06 11:06  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\文档\文档.txt

     文件        187  2018-06-06 11:03  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\涉及的控件.txt

    ..A..H.     83456  2018-06-06 11:05  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\.vs\WindowsFormsApplication1\v14\.suo

     文件        189  2018-06-06 10:09  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\App.config

     文件     179496  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\de\DevExpress.Data.v15.2.resources.dll

     文件      25896  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\de\DevExpress.Office.v15.2.Core.resources.dll

     文件      11560  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\de\DevExpress.Pdf.v15.2.Core.resources.dll

     文件      14120  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\de\DevExpress.Printing.v15.2.Core.resources.dll

     文件     189736  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\de\DevExpress.RichEdit.v15.2.Core.resources.dll

     文件      12072  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\de\DevExpress.Sparkline.v15.2.Core.resources.dll

     文件      26408  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\de\DevExpress.Utils.v15.2.resources.dll

     文件      40232  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\de\DevExpress.XtraBars.v15.2.resources.dll

     文件     105256  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\de\DevExpress.XtraEditors.v15.2.resources.dll

     文件      41768  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\de\DevExpress.XtraGrid.v15.2.resources.dll

     文件      16680  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\de\DevExpress.XtraLayout.v15.2.resources.dll

     文件      21288  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\de\DevExpress.XtraPrinting.v15.2.resources.dll

     文件      17704  2018-06-01 14:40  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\de\DevExpress.XtraTreeList.v15.2.resources.dll

     文件    5203752  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DevExpress.Data.v15.2.dll

     文件    1123927  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DevExpress.Data.v15.2.xml

     文件    1106728  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DevExpress.Office.v15.2.Core.dll

     文件      97896  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DevExpress.Office.v15.2.Core.xml

     文件    1016104  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DevExpress.Pdf.v15.2.Core.dll

     文件     262655  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DevExpress.Pdf.v15.2.Core.xml

     文件     354088  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DevExpress.Pdf.v15.2.Drawing.dll

     文件      43917  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DevExpress.Pdf.v15.2.Drawing.xml

     文件    3723048  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DevExpress.Printing.v15.2.Core.dll

     文件    1190076  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DevExpress.Printing.v15.2.Core.xml

     文件    6158632  2018-06-01 14:40  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DevExpress.RichEdit.v15.2.Core.dll

     文件    1904339  2018-06-01 14:40  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DevExpress.RichEdit.v15.2.Core.xml

     文件      78632  2018-06-01 14:39  ComboBoxEdit、CheckedComboBoxEdit、ListBoxControl、CheckedListBoxControl、SpinEdit、LookUpEdit\源码\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\DevExpress.Sparkline.v15.2.Core.dll

............此处省略117个文件信息

评论

共有 条评论