Thanks for the kind words.
If using the bound grid control, you should keep in mind that this control is mainly data-driven and cell instances are created only for visible cells. If you want to control cells manually and work with the grid in terms of cells and rows, you should consider using the unbound grid control.
To start editing a cell in the bound grid control, first make it visible in the view:
// Set desired data source item
boundGridControl1.FocusedDataSourceItem = dataset11.Table1[3];
// Set desired grid column
boundGridControl1.FocusedCellColumn = Column2Column;
boundGridControl1.EnsureVisibleVertically(boundGridControl1.FocusedRowIndex);
boundGridControl1.FocusedCell.StartEdit();
We are aware that this approach may be a little obscure and that is why the next release (which is scheduled for the middle of September) will introduce a new task-oriented method
StartCellEditByDataSourceItem
.
The question about adding child objects is not completely clear. Would you provide more details?
The combo box cell content is controlled by the following proerties:
MappingDataSource
,
MappingValueDataMember
and
MappingDisplayDataMember
. You can set these properties at the column level and at the cell level. Here is a piece of code illustrating this:
public class MyClass
{
public string MyProperty
{
get
{
//..
}
}
}
//..
private MyClass[] MyComboChoices;
//..
myComboColumn1.MappingDataSource = MyComboChoices;
myComboColumn1.MappingDisplayDataMember = "MyProperty";
myComboColumn1.MappingValueDataMember = "MyProperty";
In the above code, MyComboChoices is a container with combo box item objects. The two strings are names of display and value property names of objects in this container. If this container is a list of strings, integers or other simple types, you can use the special
[-1] value for both property names.
At the moment you can set these values at the cell level only for the unbound grid, but we will provide this feature for the bound grid control in the upcoming release.