or
radGridView1.GroupDescriptors.Add(new GridGroupByExpression("Format Group By Format")); GridViewSummaryRowItem item1 = new GridViewSummaryRowItem(); item1.Add(new GridViewSummaryItem("pct", "Total: {0:F2} ", GridAggregateFunction.Sum));using System.Windows.Forms;using Telerik.WinControls.Enumerations;using Telerik.WinControls.UI;namespace TestListboxSortAnSelection{ public partial class Form1 : Form { public Form1() { InitializeComponent(); this.radListControl1.SelectionMode = SelectionMode.MultiExtended; this.radListControl1.SortStyle = SortStyle.Ascending; this.radListControl1.Items.Add(new RadListDataItem("Test 1")); this.radListControl1.Items.Add(new RadListDataItem("Test 3") { Selected = true }); this.radListControl1.Items.Add(new RadListDataItem("Test 2") { Selected = true }); } private void radButton1_Click(object sender, System.EventArgs e) { MessageBox.Show(string.Concat("Selected items: ", this.radListControl1.SelectedItems.Count)); } /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.radListControl1 = new Telerik.WinControls.UI.RadListControl(); this.radButton1 = new Telerik.WinControls.UI.RadButton(); ((System.ComponentModel.ISupportInitialize)(this.radListControl1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.radButton1)).BeginInit(); this.SuspendLayout(); // // radListControl1 // this.radListControl1.CaseSensitiveSort = true; this.radListControl1.ItemHeight = 18; this.radListControl1.Location = new System.Drawing.Point(12, 12); this.radListControl1.Name = "radListControl1"; this.radListControl1.Size = new System.Drawing.Size(431, 312); this.radListControl1.TabIndex = 0; this.radListControl1.Text = "radListControl1"; // // radButton1 // this.radButton1.Location = new System.Drawing.Point(313, 330); this.radButton1.Name = "radButton1"; this.radButton1.Size = new System.Drawing.Size(130, 24); this.radButton1.TabIndex = 1; this.radButton1.Text = "radButton1"; this.radButton1.Click += new System.EventHandler(this.radButton1_Click); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(455, 366); this.Controls.Add(this.radButton1); this.Controls.Add(this.radListControl1); this.Name = "Form1"; this.Text = "Form1"; ((System.ComponentModel.ISupportInitialize)(this.radListControl1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.radButton1)).EndInit(); this.ResumeLayout(false); } private Telerik.WinControls.UI.RadListControl radListControl1; private Telerik.WinControls.UI.RadButton radButton1; }}