随笔分类 - DataGridView
摘要://禁止每一列点击标题排序 for (int i = 0; i < dataGridView1.Columns.Count; i++) { dataGridView1.Columns[i].SortMode = DataGridViewColumnSortMode.NotSortable; }
阅读全文
摘要:如在做工资表,希望第一列"姓名"在左右拖运滚动条时固定 dataGridView1.Columns[0].Frozen = true;
阅读全文
摘要:如果该dataGridView是跟数据库绑定的,则可以触发DataBindingComplete事件: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1private void dataGridView1_DataBindingComple...
阅读全文
摘要:在属性里面将AllowUserToAddRows设成false 或是直接用代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1dataGridView1.AllowUserToAddRows = false;
阅读全文

浙公网安备 33010602011771号