using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

public partial class RadGridSelectionItemsSort : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        List<int> indices = new List<int>();
        foreach (GridDataItem item in RadGrid1.SelectedItems)
        {
            indices.Add(item.ItemIndex);
        }
        indices.Sort();
        Label1.Text = "<b>Selected:</b><br/>" + string.Join("<br/>", indices.ToArray());
    }
}