c#
文章平均质量分 81
chenmingfa110
这个作者很懒,什么都没留下…
展开
-
gridcontrol添加序号
private void gridView2_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e) {//序号 if (e.Info.IsRowIndicator && e.RowHandle >= 0原创 2018-01-15 16:30:56 · 2505 阅读 · 0 评论 -
{转}Excel 导入数据到GridControl中的方法
private void simpleButton1_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Title = "Excel文件"; ofd.FileName = ""; o...转载 2018-07-02 14:05:53 · 1789 阅读 · 0 评论 -
gridcontrol 设置某行某列的默认值
private void gridView1_InitNewRow(object sender, InitNewRowEventArgs e) { GridView view = sender as GridView; view.SetRowCellValue(e.RowHandle, view.Columns["具体列名"], 默认值)...原创 2018-07-02 09:18:09 · 4691 阅读 · 0 评论 -
DEV gridview 统计汇总实现
1设置gridview 的opensView的ShowFooter为true2设置某列的summaryItem属性,sumtype为设置的类型,filename通常和列的filename对应。3绑定数据源预览即可。转载 2018-03-21 16:20:20 · 1948 阅读 · 0 评论 -
EntityFramework调用分页存储过程
感谢博主https://www.cnblogs.com/qk2014/p/6824103.html此文讲述mvc4+entityframework6+sqlserver2008环境下调用存储过程,实现分页。1、分页存储过程代码如下:分页原理用的row_number()和over()函数实现(没有用top、not in,因为性能低;sqlserver2012有新特转载 2018-02-07 16:40:55 · 304 阅读 · 0 评论 -
图片的上传(流)
//创建一个对话框对象 OpenFileDialog ofd = new OpenFileDialog(); //为对话框设置标题 ofd.Title = "请选择上传的图片"; //设置筛选的图片格式 ofd.Filter =转载 2018-02-07 10:55:45 · 1413 阅读 · 0 评论 -
searchlookupedit的选择以及行数据的获取
private void gridView3_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { int selectRow = gridView3.GetSelectedRows()[0];//选择行号 string col原创 2018-02-06 11:04:32 · 5644 阅读 · 2 评论 -
gridcontrol显示行号
/// /// GridView 显示行号 设置行号列的宽度 /// /// GridView 控件名称 /// 行号列的宽度 如果为null或为0 默认为30 public void DrawRowIndicator(DevExpress.XtraGrid.Views.Grid原创 2018-02-06 11:02:43 · 1180 阅读 · 0 评论 -
gridControl自动增加行添加数据
绑定gridControl的对象list,(opList为ord_plantofo_view的list;)gridControl1.DataSource = new BindingList(opList); var grv = this.tofoInfoDXGrv;grv.OptionsBehavior.ReadOnly = false; grv.OptionsBehavior.E原创 2018-02-06 08:28:57 · 11454 阅读 · 0 评论 -
窗体传值(回传)。事件委托
form1:1.主窗体点击按钮(或其他事件)实例化TofoinfoFormTofoinfoForm tif = new TofoinfoForm(); tif.setFormTextValue += new setTextValue(form2_setFormTextValue); //第五步:实现事件 void form2_s转载 2018-02-06 08:26:00 · 254 阅读 · 0 评论 -
无法生成模型:“表“TableDetails”中列“IsPrimaryKey”的值为DBNull
解决方案:Execute the following commands in MySQL. use name>>; set global optimizer_switch='derived_merge=OFF';转载 2018-01-24 15:19:01 · 375 阅读 · 0 评论 -
{转}C#使用微软语言包来获取中文汉字的拼音、拼音首字母、中文繁体
首先需要获取ChnCharInfo.dll和ChineseConverter.dllChnCharInfo.dll官方下载操作如下:先下载微软Microsoft Visual Studio International Pack 1.0 SR1语言包:Microsoft Visual Studio International Pack 1.0 SR1Microsoft Visual Studio I...转载 2018-07-02 15:04:21 · 1084 阅读 · 0 评论