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

Grid gets confused by URLs in text field

Thread ID:

Created:

Updated:

Platform:

Replies:

12545 Apr 1,2004 06:23 PM UTC Apr 1,2004 10:50 PM UTC WinForms 3
loading
Tags: GridControl
simon
Asked On April 1, 2004 06:23 PM UTC

I have a grid containing two columns, a URL and a text field. I didnt set any special Style properties and they are mapped to a table. When i click on a URL it turns blue and a little hand mouse cursor appears. BUT the text insertion caret appears at the beginning of the URL and even if i click at the end of the link it still keeps the cursor at the beginning. I can still use the cursor keys to edit the field. its not as if it is locked. The wierder thing (which in fact suggests what the underlying problem is) is that the NEXT cell i click on still has the problem even if it doesnt contain a URL. I know that a single TextBox is used for editing so it is probably keeping some state. You can easily duplicate this without creating a test project. Just load the ''GDBGwithDropGrids'' example (probably any will do). Enter two URLs in the CompanyName field. You will see they turn blue. If you click around on the first URL everything is fine. Then click on the second and the caret will be in the wrong place. Then click on a regular column and it will STILL be in the wrong place. Then click on another regular column and it will be OK. I dont need the URL to be blue, so maybe disabling that will fix this if there is no other fix. -simon

Administrator [Syncfusion]
Replied On April 1, 2004 08:04 PM UTC

The default textbox cell uses a RichTextBox as the cell control. So, it is this RichTextBox that is displaying the link. It you do not want it displayed as a link, you might try setting the style.CellType = "Static". This should just display the text.

simon
Replied On April 1, 2004 08:44 PM UTC

I still need to be able to edit the URL so i cant use static. I tried ''Textbox'' but this is still underlining the link. There is also ''RichTextBox'' which i didnt try. Did you try the test I gave. The problem here is more than just underlining the link (which i dont really care too much about). The problem is that the caret is not put in the right place when clicking on a cell given the fact that the PREVIOUS cell you click on contains a link. -simon

Administrator [Syncfusion]
Replied On April 1, 2004 10:50 PM UTC

Try setting the CellType = "OriginalTextBox". This will use a Windows Forms TextBox which will not handle a link in any special manner like the RichTextBox does. GridStyleInfo style = this.customerGrid1.Binder.InternalColumns[2].StyleInfo; style.CellType = "OriginalTextBox";

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

;