datagridview 新增方式

时间:2014-06-11 13:24:07   收藏:0   阅读:369

            //新增
            this.dataGridView1.AllowUserToAddRows = true;
            if (iTag == 1)
            {
                //默认自动编号排序
                dataGridView1.Columns["taskId"].HeaderCell.SortGlyphDirection = SortOrder.Ascending;
                //跳到最后一行
                bindingNavigatorMoveLastItem.PerformClick();
            }
            if (iTag == 2)
            {//默认自动编号排序
                dataGridView1.Columns["planId"].HeaderCell.SortGlyphDirection = SortOrder.Ascending;
                bindingNavigatorMoveLastItem.PerformClick();
            }

datagridview 新增方式,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!