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.

How to disable URL underline

Thread ID:

Created:

Updated:

Platform:

Replies:

24971 Feb 15,2005 12:45 PM Jun 13,2007 02:54 PM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On February 15, 2005 12:45 PM

I am using virtual virtual grid. I observed that default cells underline hyperlinks. How do I disable hyperlink detection? I am using Syncfusion 2.1.0.9

Administrator [Syncfusion]
Replied On February 15, 2005 01:49 PM

By default, the grid uses a RichTextBox for editing. It is this control that is underlining the link. Try this setting: this.gridDataBoundGrid1.TableStyle.CellType = "OriginalTextBox"; It sets the grid to default to a TextBox control for editing.

Ichiro Sugimoto
Replied On June 13, 2007 05:59 AM

I can disable blue underline in Textbox cell by changing celltype to "OriginalTextBox", indeed.
Then, How can I do for Combobox cell, whose DropDownStyle is Editable?
(I cannot find celltype "OriginalCombobox"...)

>By default, the grid uses a RichTextBox for editing. It is this control that is underlining the link.
>
>Try this setting:
>
>this.gridDataBoundGrid1.TableStyle.CellType = "OriginalTextBox";
>

>
>It sets the grid to default to a TextBox control for editing.

haneefm [Syncfusion]
Replied On June 13, 2007 02:54 PM

Hi Sugimoto,

You can handle the CurrentCellControlGotFocus event and set the DetectUrls property of the RichTextBox control to false. Here is a code snippet.

private void gridDataBoundGrid1_CurrentCellControlGotFocus(object sender, System.Windows.Forms.ControlEventArgs e)
{
RichTextBox RTB = e.Control as RichTextBox;
if( RTB != null )
{
RTB.DetectUrls = false;
}
}

If you want to change the underlying style of the richtextbox then you need to import the "user32.dll" and call the sendMessage method. Here is a minimal sample that shows you "How to set underlying style in a RichTextControl?".

Sample :GDBGUnderlineStyle.zip

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.

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.

;