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.
Unfortunately, activation email could not send to your email. Please try again.

How to hide cell contents?

Thread ID:





49079 Sep 11,2006 08:01 AM Sep 12,2006 06:25 AM Windows Forms 2
Tags: GridControl
Konstantin Babiy
Asked On September 11, 2006 08:01 AM

Hello everybody

I have next issue in gridGroupingControl:
When starting editing of a cell (from ONE specific column), I need to hide cell contents and only show user what he enterred, and then (when value entering is finished) append enterred value to previous value and show it all.

I tried to do it through operations with a datasource, but met a problem that setting any value to a datasource makes focus leaving cell and accepting enterred data.

Thanks for your help!

Administrator [Syncfusion]
Replied On September 11, 2006 08:55 AM

Hi Konstantin,

You can handle the TableControlCurrentCellStartEditing to get the Old text before editing the cell and handle the TableControlCurrentCellEditingCompleteto to set the combined text to the cell. Below is a code snippet.

string currentValue = string.Empty;

private void TableControlCurrentCellStartEditing(object sender, GridTableControlCancelEventArgs e)
GridCurrentCell cc = e.TableControl.CurrentCell;
currentValue = e.TableControl.Model[cc.RowIndex,cc.ColIndex].Text;
cc.Renderer.ControlText = string.Empty;

private void TableControlCurrentCellEditingComplete(object sender, GridTableControlEventArgs e)
GridCurrentCell cc = e.TableControl.CurrentCell;
e.TableControl.Model[cc.RowIndex,cc.ColIndex].Text = currentValue + e.TableControl.Model[cc.RowIndex,cc.ColIndex].Text;

Let me know if this helps.
Best Regards,

Konstantin Babiy
Replied On September 12, 2006 06:25 AM

Thank you Haneef, that really helped me!


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.

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.