namespace GridClearSelectedRows
using System.Windows.Forms;
public partial class Form1 : Form
private void Form1_Load(object sender, EventArgs e)
this.ultraGrid1.Dock = DockStyle.Fill;
this.ultraGrid1.DataSource = this.InitializeGridDataSource(10);
private DataTable InitializeGridDataSource(int rows)
DataTable table = new DataTable("Table1");
table.Columns.Add("Boolean column", typeof(Boolean));
table.Columns.Add("Integer column", typeof(Int32));
table.Columns.Add("DateTime column", typeof(DateTime));
table.Columns.Add("String column", typeof(String));
for (int i = 0; i < rows; i++)
DataRow row = table.NewRow();
row["Boolean column"] = i % 2 == 0 ? true : false;
row["Integer column"] = i;
row["String column"] = "text";
row["DateTime column"] = DateTime.Now;
private void ultraButton1_Click(object sender, EventArgs e)
foreach (var row in this.ultraGrid1.Rows.Where(row => row.Selected == true))