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

How to access the richTextBox.SelectionColor property in essential grid cells

Thread ID:

Created:

Updated:

Platform:

Replies:

84509 Jul 1,2009 05:31 AM UTC Jul 3,2009 01:42 PM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On July 1, 2009 05:31 AM UTC

Hi

I want a particular cell in my grid to have texts in multiple colors, for that i need to access the richtextbox selectioncolor property. How do i access it when the only object i get is grid control

Rajadurai C [Syncfusion]
Replied On July 3, 2009 01:42 PM UTC

Hi Natasha,

Thanks for your interest in Syncfusion Products.

To access the SelectionColor property of the specific richtextcelltype cell in grid, you can handle its renderer through the MouseDown event. Please refer to the following code.

private void gridControl1_MouseDown(object sender, MouseEventArgs e)
{
int row, col;
this.gridControl1.PointToRowCol(new Point(e.X, e.Y), out row, out col);
if (gridControl1[row, col].CellType == "RichText")
{
GridCurrentCell cc = this.gridControl1.CurrentCell;
GridRichTextBoxCellRenderer rtr = cc.Renderer as GridRichTextBoxCellRenderer;
RichTextBox richText = rtr.Control as RichTextBox;
//access properties for the specific cell
}
}


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.

Please sign in to access our forum

or the page will be automatically redirected to 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

;