Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
544
FormattedLinkEditor and URL editing
posted

I have a column with style set to and Editor set to instance of FormattedLinkEditor which has TreatValue set to URL as well: 

DocumentsGrid.Rows.Band.Columns["Link"].Editor = DocumentLinkControl;
DocumentsGrid.Rows.Band.Columns["Link"].CellActivation = Activation.AllowEdit;

 When I edit the contents of a link by modifying its contents directly, everything is ok but when I select a link via button which displays a list of links, link gets set to the FormattedLinkEditor as expected. When I leave the editing control, link gets wrapped in some html tags and in the end it doesn't look nice :)  

 I know this explanation is a bit confusing so let me clarify it with example: If user enters text with keyboard eg. C:\testfile.txt, link will display as expected C:\testfile.txt and when user will leave that cell, link will stay in the same format. When user decides to select link from predefined set of links, it will select C:\testfile.txt and when leaving editing mode of that cell some kind of formatting will be applied so link will look like this: <a href="C:\testfile.txt">C:\testfile.txt</a> .

 When setting the selected link programmatically in FormattedLinkEditor, I set the Value property (which displays link correctly  at all times). When link gets "stored" to cell, it gets somehow corrupted. 

I've tried to fix this by setting Style of the column after setting Editor property but to no avail.

 I don't know whether this is expected behaivour or an error in use of the control. If you need an example to reproduce an error, please let me know.

 Best regards.

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Andrej,

        If I understand you correctly, you are providing the user with a list of links and they choose one. At this point, how are you taking that choice and putting it into the grid cell? I would think you would need to set the Value property of the grid cell. Are you doing it in some other way? 

Reply Children