Remove current line

2 posts, 0 answers
  1. Ing. Jesus Manuel
    Ing. Jesus Manuel avatar
    16 posts
    Member since:
    Apr 2013

    Posted 10 Feb 2017 Link to this post

    Hello, I have the caretposition in a blank line, it just have the Enter symbol, I want to remove this line, I can't find a method to do this, you think you cal help me? Please.
  2. Hristo
    Hristo avatar
    1508 posts

    Posted 13 Feb 2017 Link to this post

    Hello Jesus, 

    Thank you for writing.

    You can utilize the document position API and then execute the Delete command. Please check my code snippet below: 
    private void button1_Click(object sender, EventArgs e)
        DocumentPosition startPosition = new DocumentPosition(this.radRichTextEditor1.Document.CaretPosition);
        DocumentPosition endPosition = new DocumentPosition(startPosition);

    I am also sending you a short video showing the result on my end.

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top