示例#1
0
 private void dataGridView_ColumnHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     ShinROSE_Dev_Workshop.STB.Userdialog userdialog = new ShinROSE_Dev_Workshop.STB.Userdialog();
     userdialog.textBoxInfo.Text = this.dataGridView.Columns[e.ColumnIndex].Name;
     if (userdialog.ShowDialog() == DialogResult.OK)
     {
         this.dataGridView.Columns[e.ColumnIndex].Name = userdialog.textBoxInfo.Text;
     }
 }
示例#2
0
        private void addRowsBelowMenuItem_Click(object sender, EventArgs e)
        {
            Userdialog userdialog = new Userdialog();

            userdialog.Text             = "Add Rows";
            userdialog.LabelInfo.Text   = "Rows count :";
            userdialog.textBoxInfo.Text = "1";
            if (userdialog.ShowDialog() == DialogResult.OK)
            {
                for (int num = 0; num != Convert.ToInt32(userdialog.textBoxInfo.Text); num++)
                {
                    this.dataGridView.Rows.Insert(this.dataGridView.SelectedRows[0].Index + 1, new object[0]);
                }
                for (int num = 0; num != this.dataGridView.Rows.Count; num++)
                {
                    this.dataGridView.Rows[num].HeaderCell.Value = num.ToString();
                }
            }
        }
示例#3
0
 private void dataGridView_ColumnHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     ShinROSE_Dev_Workshop.STB.Userdialog userdialog = new ShinROSE_Dev_Workshop.STB.Userdialog();
     userdialog.textBoxInfo.Text = this.dataGridView.Columns[e.ColumnIndex].Name;
     if (userdialog.ShowDialog() == DialogResult.OK)
     {
         this.dataGridView.Columns[e.ColumnIndex].Name = userdialog.textBoxInfo.Text;
     }
 }
示例#4
0
 private void addRowsBelowMenuItem_Click(object sender, EventArgs e)
 {
     Userdialog userdialog = new Userdialog();
     userdialog.Text = "Add Rows";
     userdialog.LabelInfo.Text = "Rows count :";
     userdialog.textBoxInfo.Text = "1";
     if (userdialog.ShowDialog() == DialogResult.OK)
     {
         for (int num = 0; num != Convert.ToInt32(userdialog.textBoxInfo.Text); num++)
         {
             this.dataGridView.Rows.Insert(this.dataGridView.SelectedRows[0].Index + 1, new object[0]);
         }
         for (int num = 0; num != this.dataGridView.Rows.Count; num++)
         {
             this.dataGridView.Rows[num].HeaderCell.Value = num.ToString();
         }
     }
 }