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
close icon

Syncfusion grid

Can you please let me know as what is the use of the property - AllowFloating in Class - GridStaticCellModel Regards Lokesh

3 Replies

AD Administrator Syncfusion Team March 22, 2006 06:00 AM UTC

Hi Lokesh, The GridStaticCellModel.AllowFloating will specify the celltype supports being floated or flooded. Here is the code snippet which, explains how to set the property. // In Form_Load event GridStaticCellModel ds = new GridStaticCellModel(this.gridControl1.Model); ds.AllowFloating = true; this.gridControl1.CellModels.Add("Floating" ,ds); this.gridControl1.FloatCellsMode = Syncfusion.Windows.Forms.Grid.GridFloatCellsMode.BeforeDisplayCalculation; // to specify the floating cells behaviour are to be calculated before the cells are displayed private void gridControl1_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e) { if(e.ColIndex == 1 && e.RowIndex ==1) { e.Style.CellValue = "abcdefghijklmnopqrstuvwxyz"; e.Style.CellType = "Floating"; e.Style.FloatCell = true; } } Let us know if you any further information. Best regards, Madhan.


LO Lokesh March 28, 2006 03:55 AM UTC

What exactly floating means ? >Hi Lokesh, > >The GridStaticCellModel.AllowFloating will specify the celltype supports being floated or flooded. Here is the code snippet which, explains how to set the property. > >// In Form_Load event >GridStaticCellModel ds = new GridStaticCellModel(this.gridControl1.Model); >ds.AllowFloating = true; >this.gridControl1.CellModels.Add("Floating" ,ds); >this.gridControl1.FloatCellsMode = Syncfusion.Windows.Forms.Grid.GridFloatCellsMode.BeforeDisplayCalculation; // to specify the floating cells behaviour are to be calculated before the cells are displayed > >private void gridControl1_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e) >{ > if(e.ColIndex == 1 && e.RowIndex ==1) > { > e.Style.CellValue = "abcdefghijklmnopqrstuvwxyz"; > e.Style.CellType = "Floating"; > e.Style.FloatCell = true; > } >} > >Let us know if you any further information. > >Best regards, >Madhan.


AD Administrator Syncfusion Team March 28, 2006 05:11 AM UTC

Hi Lokesh, Floating is the process by which the contents of one cell floats over to an adjacent cell but, the adjacent cell has to be empty. Also refer to the Syncfusion documentation ( // EssentialGrid / Windows forms / Basic Concepts / Floating Cells ) for more details on this issue. For a sample refer to the browser sample ( \\windows\Grid.Windows\Samples\Quick Start\FloatingCells ) Best regards, Madhan.

Loader.
Live Chat Icon For mobile
Up arrow icon