How can i disable some control and contentl of RichTex Cell
Hi everyone, thank you for watching and helping me.
How can i disable ( or hide ) control box and disable edit content of RichTextBox when click on dropdownbutton of RichTextCell of GGC

Thank you.
Best Regards
How can i disable ( or hide ) control box and disable edit content of RichTextBox when click on dropdownbutton of RichTextCell of GGC
Thank you.
Best Regards
SIGN IN To post a reply.
3 Replies
AR
Arulpriya Ramalingam
Syncfusion Team
April 3, 2018 10:46 AM UTC
Hi Truong,
Thanks for using Syncfusion product.
We have analyzed your requirement and suspect that you are trying to edit the content of RichText cell instead of editing through theDropDown container. If yes, we already provided a KB to achieve this scenario and please make use of the below KB link,
Note
If your requirement is to hide/disable the DownDown button to avoid opening the DropDown, please refer to the below KB link also let us know your exact requirement if we misunderstood,
Regards,
Arulpriya
TR
Truong
April 5, 2018 07:41 AM UTC
Hi Arulpriya Ramalingam,
First i want say thank you for your helping.
In my case i do not trying to edit the content of RichText cell instead of editing through the DropDown container or hide/disable the DownDown button.
I am trying to editing DropDown Container. Example : disable button , or disable chose font, font size
Thank you,
Best Regards
SN
Sindhu Nagarajan
Syncfusion Team
April 6, 2018 02:50 PM UTC
Hi Truong,
Thanks for the update.
As per GridGroupingControl architecture, the controls present in the RichTextBox were added in a panel. These controls can be hidden by setting Controls.Visible property to False inside the TableControlCurrentCellShowingDropDown event. If the content of the cell are edited by using RichTextBox, to save the changes done, the text entered is set to the the current cell by using SetValue property. Please refer to the below code and sample,
Code Example
|
gridGroupingControl1.TableControlCurrentCellShowingDropDown += GridGroupingControl1_TableControlCurrentCellShowingDropDown;
private void GridGroupingControl1_TableControlCurrentCellShowingDropDown(object sender, GridTableControlCurrentCellShowingDropDownEventArgs e)
{
var ren = e.TableControl.CurrentCell.Renderer as GridRichTextBoxCellRenderer;
var panel = ren.DropDownContainer.Controls[0] as GridRichTextEntryPanel;
for (int i = panel.Controls.Count-1; i >= 0; i--)
{
if (!(panel.Controls[i] is RichTextBox))
panel.Controls.Remove(panel.Controls[i]);
}
//To remove the unwanted spaces
panel.Controls[0].Dock = DockStyle.Fill;
}
private void GridGroupingControl1_TableControlCurrentCellCloseDropDown(object sender, GridTableControlPopupClosedEventArgs e)
{
var ren = e.TableControl.CurrentCell.Renderer as GridRichTextBoxCellRenderer;
var panel = ren.DropDownContainer.Controls[0] as GridRichTextEntryPanel;
var s = panel.Controls[0].Text;
int rowIndex = e.TableControl.CurrentCell.RowIndex;
int colIndex = e.TableControl.CurrentCell.ColIndex;
GridTableCellStyleInfo sty = e.TableControl.GetTableViewStyleInfo(rowIndex, colIndex);
Record rec = sty.TableCellIdentity.DisplayElement.GetRecord();
if (rec != null)
rec.SetValue(sty.TableCellIdentity.Column.Name, s);
} |
Please let us know if you have any other queries.
Regards,
Sindhu
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
TR Truong
- Apr 2, 2018 08:14 AM UTC
- Apr 6, 2018 02:50 PM UTC