Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SelectionCollection.RemoveAt(Int32) Method

Deletes a selection specified by its index.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v24.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

#Declaration

public void RemoveAt(
    int index
)

#Parameters

Name Type Description
index Int32

An integer that is the zero-based index of a selection to delete.

#Example

View Example

document.LoadDocument("SelectionCollection.docx", DocumentFormat.OpenXml)
Dim range1 As DocumentRange = document.CreateRange(80, 100)
Dim range2 As DocumentRange = document.CreateRange(300, 100)
Dim startPos3 As Integer = document.Tables(0).Rows(0).LastCell.ContentRange.Start.ToInt()
Dim range3 As DocumentRange = document.CreateRange(startPos3, 100)
Dim range4 As DocumentRange = document.CreateRange(720, 100)
document.Selections.Add(New List(Of DocumentRange)() From {range1, range2, range3, range4})
document.Selections.RemoveAt(0)

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RemoveAt(Int32) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also