ExportCSV : How to change delimeter

3 posts, 0 answers
  1. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 09 Dec 2010 Link to this post


    How I can change the comma separated when I use the ExportCSV
    I want to use ";"  and no "," for the delimeter


  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 09 Dec 2010 Link to this post


    As far as I'm aware this is not currently possible.

    In the Telerik.WinControls.UI.Export.CSV namespace there is a RowElement class. In this class exists a Protected sub  called RenderChildElements.
    This performs the following action:

    Protected Overrides Sub RenderChildElements(ByVal sb As StringBuilder)
        If (Me._cells.Count > 0) Then
            Dim element As CellElement
            For Each element In Me._cells
                If (Me._cells.IndexOf(element) < (Me._cells.Count - 1)) Then
                End If
        End If
    End Sub

    protected override void RenderChildElements(StringBuilder sb)
        if (this._cells.Count > 0)
            foreach (CellElement element in this._cells)
                if (this._cells.IndexOf(element) < (this._cells.Count - 1))

    As you can see, the delimiter is hard coded and cannot be changed. I would suggest a feature request to Telerik that this is repplaced with a RadDelimiter that can be set as a property after instantiating the ExportToCSV class.

    Hope that helps
  3. Martin Vasilev
    Martin Vasilev avatar
    1061 posts

    Posted 14 Dec 2010 Link to this post

    Hi guys,

    Indeed, Richard is right and currently we do not support changing the CSV delimiter in ExportToCSV. We will consider adding this feature in one of the next releases.

    All the best,
    Martin Vasilev
    the Telerik team
    Check out the Q1 2011 Roadmap for Telerik Controls for Windows Forms.
Back to Top