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

Cell Value Selected

Thread ID:

Created:

Updated:

Platform:

Replies:

52851 Dec 5,2006 11:58 AM UTC Dec 6,2006 09:09 AM UTC WinForms 3
loading
Tags: GridControl
Ubaid
Asked On December 5, 2006 11:58 AM UTC


AOA,

How can i get cell value selected on cell click ...

Administrator [Syncfusion]
Replied On December 5, 2006 12:35 PM UTC

Hi Ubaid,

Please try this code.

object ocellvalue = this.grid.Model[e.RowIndex,e.ColIndex].CellValue;

Best Regards,
Haneef

Administrator [Syncfusion]
Replied On December 6, 2006 07:47 AM UTC


Hi ... Sorry for putting an ambiguous question ...

Actually, i dont want to get the value of cell, what i want is ... that when i click on a cell, the text in that cell gets selected like when we double click in a cell, whole of the text gets selected.

Administrator [Syncfusion]
Replied On December 6, 2006 09:09 AM UTC

Hi Ubaid,

You can access the GridTextBoxCellRenderer and call Select() method to select a portion of text inside TextBoxCell. Here is a code snippet to show this.

//Use this code CellClick event
GridCurrentCell cc = this.grid.CurrentCell;
cc.MoveTo(e.RowIndex,e.ColIndex);
cc.BeginEdit();

GridTextBoxCellRenderer cr = cc.Renderer as GridTextBoxCellRenderer;
cr.TextBox.Select(1,5);

Best Regards,
Haneef

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

;