⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 datagrid(创建样式).txt

📁 C# 是创新性的新式编程语言
💻 TXT
字号:
private void CreateStyles(DataGrid dg)
		{
			DataGridTableStyle style=new DataGridTableStyle();
			style.MappingName="RecoTable";
			//
			DataGridTextBoxColumn customerID=new DataGridTextBoxColumn();
			customerID.HeaderText="标识";
			customerID.MappingName="ID";
			customerID.Width=30;
			//
			DataGridTextBoxColumn english=new DataGridTextBoxColumn();
			english.HeaderText="第一名称";
			english.MappingName="firstname";
			english.Width=300;
			//
			DataGridTextBoxColumn chinese=new DataGridTextBoxColumn();
			chinese.HeaderText="第二名称";
			chinese.MappingName="lastname";
			chinese.Width=300;
			//
			DataGridTextBoxColumn times=new DataGridTextBoxColumn();
			times.HeaderText="部门编号";
			times.MappingName="numdep";
			times.Width=40;
			style.GridColumnStyles.AddRange(new DataGridColumnStyle[]{customerID,english,chinese,times});
			dg.TableStyles.Add(style);
		}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -