ListBox - Reorder get all items

2 posts, 0 answers
  1. Kjell
    Kjell avatar
    221 posts
    Member since:
    May 2011

    Posted 01 Nov 2016 Link to this post

    How do I get all the items server side in the ListBox as a comma-delimited string without selecting any?
    The visitor will sort the items and then save them sorted ....
  2. Eyup
    Eyup avatar
    3647 posts

    Posted 04 Nov 2016 Link to this post

    Hi Kjell,

    You can use the common string.Join method to achieve this requirement:
    protected void Button1_Click(object sender, EventArgs e)
        string result = string.Join(", ", RadListBox1.Items.Select(x => x.Text));
        LabelOutput.Text = result;

    I hope this will prove helpful.

    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Back to Top