This project is read-only.

How can i add control on grid[2,1] like "ComboxBox" SelectIndexChanged

Oct 7, 2009 at 9:42 AM

How can i add control on grid[2,1]  like "ComboxBox" SelectIndexChanged
   string[] arrayString = new string[] { "AA","BB","CC","DD" };
   SourceGrid.Cells.Editors.ComboBox comboNoText = new SourceGrid.Cells.Editors.ComboBox(typeof(string), arrayString, false);
   comboNoText.EditableMode = SourceGrid.EditableMode.Focus | SourceGrid.EditableMode.AnyKey | SourceGrid.EditableMode.SingleClick;
   grid[2, 1] = new SourceGrid.Cells.Cell(arrayString[0], comboNoText);
   i want to add control when this grid[2,1] selectIndexChanged event?
   (likes MFC ComboBox's event --> SelectIndexChanged)

   How can i do? need help. Thank you.

Oct 8, 2009 at 10:16 AM

Subscribe to SelectIndexChanged event, and add your control.

you can access event (comboNoText.Control as System.Windows.Forms.ComboBox).SelectedIndexChanged


and then add controls via grid.LinkedControls property

Oct 22, 2009 at 3:55 AM

it's my solution:
            grid[2, 1] = new SourceGrid.Cells.Button("Change Type");
            SourceGrid.Cells.Controllers.Button buttonClickEvent = new SourceGrid.Cells.Controllers.Button();
            buttonClickEvent.Executed += new EventHandler(ChangeTypeButton_Click);

thank you. ^^