Current filter:
                                You should refresh the page.

                                How to hide row selection when Grid loses focus

                                0

                                This example illustrates how to remove row selection using the GridViewAppearances.HideSelectionRow property when Grid is not focused.

                                You must  log in  or  register  to leave comments
                                Select file
                                • Form1.cs
                                • Program.cs
                                • Form1.Designer.cs
                                Select language
                                • C#
                                • VB.NET
                                Select version
                                • v2010 vol 2.8 - v2012 vol 2.8
                                using System;
                                using System.Collections.Generic;
                                using System.ComponentModel;
                                using System.Data;
                                using System.Drawing;
                                using System.Linq;
                                using System.Text;
                                using System.Windows.Forms;
                                using DevExpress.XtraGrid.Views.Grid;
                                
                                namespace Q321057MultipleGrids
                                {
                                    public partial class Form1 : Form
                                    {
                                        public Form1()
                                        {
                                            InitializeComponent();
                                        }
                                
                                        private void Form1_Load(object sender, EventArgs e)
                                        {
                                            gridControl1.DataSource = FillDataTable();
                                            gridControl2.DataSource = FillDataTable();
                                        }
                                
                                        public static DataTable FillDataTable()
                                        {
                                            DataTable _dataTable = new DataTable();
                                            _dataTable.Columns.Add(new DataColumn("ID", typeof(int)));
                                            _dataTable.Columns.Add(new DataColumn("Name", typeof(string)));
                                            _dataTable.Rows.Add(new object[] { 1, "Apple" });
                                            _dataTable.Rows.Add(new object[] { 2, "Peach" });
                                            _dataTable.Rows.Add(new object[] { 3, "Banana" });
                                            return _dataTable;
                                        }
                                    }
                                }