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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid cell doesn't respect float settings when GridCellTextBoxRenderer.TextBox text is changed

Thread ID:





124981 Jul 12,2016 01:38 PM UTC Jul 13,2016 05:51 AM UTC WinForms 1
Tags: GridControl
Rodrigo Vedovato
Asked On July 12, 2016 01:38 PM UTC

Hello everyone! First of all, I'm sorry for the confusing title, but there is no simple way of describing my problem. 

Here's what's happening: I use a GridControl with pretty much everything customized, including the formula mechanism, which uses the Syncfusion calculation engine but needs to store the values and handle the cell values in a different way than the grid provides. 

One of the things I need to implement is that, when the user presses F2 or even double-clicks the cell, I have to replace the cell value to the current formula text to enable editing. I implemented this behavior by overriding the OnBeginEdit method on my GridTextBoxCellRenderer based class and there setting the TextBox.Text property to the formula text. This works for most cases, but the problem is: my formula cells are, by default, not allowed to float (I hide the text and replace them by a sequence of "#" characters). However, when the formula text is larger than the cell's width, I needed to temporarily turn the floating behavior on so the user can see the whole content of the formula without needing to navigate through a tiny TextBox. I've attached some images of what I wish to implement.

What I need to do when the user presses F2 (this only happens before I create the formula)

What I need to do when the user presses F2

The formula cell, after calculated

What happens when I press F2 (I realize this happens because of the floating cell mode, but I'm guessing if there is someway of turning it off while I'm editing the cell)

Thanks in advance,

Venkatesh Sundaram [Syncfusion]
Replied On July 13, 2016 05:51 AM UTC

Hi Rodrigo ,   
Thank you for the update.   
If you want to enable the floating cells to the GridControl, use the FloatCellsMode property. Please refer to the following code example in that code is used to enable the floating cells.      
this.gridControl1.TableStyle.FloatCell = true;  
this.gridControl1.FloatCellsMode = GridFloatCellsMode.OnDemandCalculation; 
Refer to the link below for more information about Floating.     


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon