AD
Administrator
Syncfusion Team
August 16, 2005 04:59 PM UTC
Try registering the GridInCell grid in the same manner as you do the multisheet grids. Then to reference a cell in the GridInCell grid from within the parent grid, you would include the sheet reference as part of the formula. eg.
=GridInCellSheet!A1 + Sin(PI(0))
AD
Administrator
Syncfusion Team
August 16, 2005 06:07 PM UTC
This is the way I have registered the GridinCell in load form:
//register custom celltype
this._SettingsGrid.CellModels.Add("GridinCell", new GridInCellModel(_SettingsGrid.Model));
GridControl protectionGrid;
//place the new celltype into each of covered cells using upper-left corner
//also set a different grid into the Tag of each cell
this._SettingsGrid[20,1].CellType = "GridinCell";
this._SettingsGrid.CoveredRanges.Add(GridRangeInfo.Cells(20, 1, 24, 3));
protectionGrid = new CellEmbeddedGrid(this._SettingsGrid);
protectionGrid.BackColor = Color.Red;
protectionGrid.RowCount = 10;
protectionGrid.ColCount = 3;
protectionGrid[1,1].Text = "this is a 10x3 grid";
protectionGrid.ThemesEnabled = true;
this._SettingsGrid[2,1].Control = protectionGrid;
this._SettingsGrid.Controls.Add(protectionGrid);
In run time I don''t see any text (this is a 10x3 grid). I don''t see red backColor. All I see is a rectangle starts from cell (20,1) and ends at cell (24,3) which is correct corner but it is not a grid.
By the way I am using Syncfusion 3.0.1.6. I should mention I also defined GridInCellModel, GridInCellRenderer and CellEmbeddedGrid class all from sample.
AD
Administrator
Syncfusion Team
August 16, 2005 06:42 PM UTC
>>this._SettingsGrid[2,1].Control = protectionGrid;
Try setting:
this._SettingsGrid[20,1].Control = protectionGrid;
NJ
Najmeh Joze-khajavi
August 17, 2005 01:40 PM UTC
Ok. Thanks for finding my mistake.