예제 #1
0
        private void selectSpell(object sender, EventArgs e)
        {
            spellIDs     spellForm = new spellIDs(this);
            DialogResult result    = spellForm.ShowDialog();

            if (result == DialogResult.OK)
            {
                //Name der zu editierenden spalte aus dem Buttonnamen holen, "search" entfernen
                Control senderControl = (Control)sender;
                string  columnName    = senderControl.Name.Substring(6);
                this.item.ItemTemplate.Rows[0][columnName] = spellForm.selectedSpellID;
                Control textControl = (Control)this.Controls.Find("item_" + columnName, true)[0];
                textControl.Text = spellForm.selectedSpellID;
            }
        }
예제 #2
0
 private void selectSpell(object sender, EventArgs e)
 {
     spellIDs spellForm = new spellIDs(this);
     DialogResult result = spellForm.ShowDialog();
     if (result == DialogResult.OK)
     {
         //Name der zu editierenden spalte aus dem Buttonnamen holen, "search" entfernen
         Control senderControl = (Control)sender;
         string columnName = senderControl.Name.Substring(6);
         this.item.ItemTemplate.Rows[0][columnName] = spellForm.selectedSpellID;
         Control textControl = (Control)this.Controls.Find("item_" + columnName, true)[0];
         textControl.Text = spellForm.selectedSpellID;
     }
 }