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.
ADAdministrator Syncfusion Team April 1, 2004 03:04 PM
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.
SIsimonApril 1, 2004 03:44 PM
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.
ADAdministrator Syncfusion Team April 1, 2004 05:50 PM
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.StyleInfo;
style.CellType = "OriginalTextBox";