Beispiel #1
0
        private void tol_add_Click(object sender, EventArgs e)
        {
            FrmMetaBindingEdit frm = new FrmMetaBindingEdit();

            frm.ShowDialog();
            InitData(100, pagerControl1.CurrentPage);
        }
Beispiel #2
0
        private void tol_edit_Click(object sender, EventArgs e)
        {
            DataRow dr = null;

            for (int i = 0; i < dataGridView1.SelectedRows.Count; i++)
            {
                dr = (dataGridView1.SelectedRows[i].DataBoundItem as DataRowView).Row;
                if (dr != null)
                {
                    FrmMetaBindingEdit frm = new FrmMetaBindingEdit(dataGridView1.SelectedRows[0].Cells[0].Value.ToString());
                    frm.ShowDialog();
                    InitData(100, pagerControl1.CurrentPage);
                    dataGridView1.Focus();
                }
            }
        }
Beispiel #3
0
 private void dataGridView1_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         DataRow dr = null;
         for (int i = 0; i < dataGridView1.SelectedRows.Count; i++)
         {
             dr = (dataGridView1.SelectedRows[i].DataBoundItem as DataRowView).Row;
             if (dr != null)
             {
                 if (dataGridView1.CurrentRow.Index != 0)
                 {
                     dataGridView1.Rows[dataGridView1.CurrentRow.Index - 1].Selected = true;
                 }
                 FrmMetaBindingEdit frm = new FrmMetaBindingEdit(dataGridView1.SelectedRows[0].Cells[0].Value.ToString());
                 frm.ShowDialog();
                 dataGridView1.Focus();
             }
             break;
         }
     }
 }