The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
RCRajadurai C Syncfusion Team 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 } }