We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Use formula cell type inside "GridinCell"

I have reviewed the sample "GridinCell" and I have the following questions: 1- Is it possible the type of cell in child grid be formulaCell type? 2- If the answer of above question is yes then how I can have access to that formula in parent grid. For example if I have formula "=Cos(Pi(0))" in cell A1 of child grid can I use this in parent grid? For example say ="A1 + sin(pi(0))" in cell E1 of parent grid. How can I refer to A1 in child grid compare to A1 in parent grid? I tried to use the sample code in my application to test the above and I wasn''t successful. My parent grid is part of multisheet grid. So I have already register that as sheet. Is there any conflict?

4 Replies

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.

Loader.
Live Chat Icon For mobile
Up arrow icon