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.
Syncfusion Feedback

grid cell text highlight

Thread ID:

Created:

Updated:

Platform:

Replies:

89143 Aug 19,2009 02:32 AM UTC Aug 19,2009 12:24 PM UTC Windows Forms 1
loading
Tags: GridControl
Stephen Hui
Asked On August 19, 2009 02:32 AM UTC

Hi,

(1)
I am trying to get the grid cell's text all highlighted when a user click (or move) on a cell, so that when he starts typing values, the old values will be wiped out automatically.

I tried using this event handler

void GridEditor_CurrentCellInitializeControlText(object sender, GridCurrentCellInitializeControlTextEventArgs e)
{
GridEditor gridEditor = (GridEditor)sender;
GridCurrentCell cell = gridEditor.CurrentCell;
cell.BeginEdit(true);
}

however, the cell.BeginEdit(true) does not work. can you tell me why?

(2)
second question is regarding the export to excel feature. is there any way to implement this feature if I only have .NET 3.0
the GridExcelConverterControl class requires dll reference from .NET 3.5

thanks,
Stephen

Rajadurai C [Syncfusion]
Replied On August 19, 2009 12:24 PM UTC

Hi Stephen,

Thanks for your interest in Syncfusion Products.

1) The entire text of the cell can be made selected while that cell gets focus by means of ActivateCurrentCellBehavior property, setting GridCellActivateAction to SelectAll. Here is the code for your reference.

this.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll;

2) With the .NET framework 3.0 application, .NET v3.5 dlls can be referred by default.

Please refer to the following sample in which the application is created with .NET 3.0 framework and the grid refers to the Syncfusion .NET 3.5v assemblies.
http://files.syncfusion.com/support/samples/Grid.Windows/7.3.0.20/F89143.zip

Regards,
Rajadurai

CONFIRMATION

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.

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

;