**Update**
Issue arrises on Vista Business and Win2k3 but not XP (only 3 OS's tested so far)
Double clicking on a forms title bar to maximise the form causes the Gridview's CellClick event to fire.
This will only happen if the mouse is hovering over a row in the grid after the form is maximised.
The CellClick event doesn't fire if you maximise the form with the top right form button.
using System;
using System.Data;
using System.Windows.Forms;
namespace GridTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void radGridView1_CellClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
DoStuff();
}
private static void DoStuff()
{
MessageBox.Show("Fired from CellClick");
}
private void Form1_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable("Stuff");
DataColumn dc = new DataColumn {DataType = typeof (string), ColumnName = "1"};
dt.Columns.Add(dc);
dc = new DataColumn {DataType = typeof (string), ColumnName = "2"};
dt.Columns.Add(dc);
dc = new DataColumn {DataType = typeof (string), ColumnName = "3"};
dt.Columns.Add(dc);
dc = new DataColumn {DataType = typeof (string), ColumnName = "4"};
dt.Columns.Add(dc);
for (int i = 0; i < 20; i++)
{
DataRow dr = dt.NewRow();
dr[0] = "Fluff";
dr[1] = "Fluff";
dr[2] = "Fluff";
dr[3] = "Fluff";
dt.Rows.Add(dr);
}
radGridView1.DataSource = dt;
radGridView1.MasterGridViewTemplate.Columns[0].Width = 350;
radGridView1.MasterGridViewTemplate.Columns[1].Width = 350;
radGridView1.MasterGridViewTemplate.Columns[2].Width = 350;
radGridView1.MasterGridViewTemplate.Columns[3].Width = 350;
}
}
}
Issue arrises on Vista Business and Win2k3 but not XP (only 3 OS's tested so far)
Double clicking on a forms title bar to maximise the form causes the Gridview's CellClick event to fire.
This will only happen if the mouse is hovering over a row in the grid after the form is maximised.
The CellClick event doesn't fire if you maximise the form with the top right form button.
using System;
using System.Data;
using System.Windows.Forms;
namespace GridTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void radGridView1_CellClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
DoStuff();
}
private static void DoStuff()
{
MessageBox.Show("Fired from CellClick");
}
private void Form1_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable("Stuff");
DataColumn dc = new DataColumn {DataType = typeof (string), ColumnName = "1"};
dt.Columns.Add(dc);
dc = new DataColumn {DataType = typeof (string), ColumnName = "2"};
dt.Columns.Add(dc);
dc = new DataColumn {DataType = typeof (string), ColumnName = "3"};
dt.Columns.Add(dc);
dc = new DataColumn {DataType = typeof (string), ColumnName = "4"};
dt.Columns.Add(dc);
for (int i = 0; i < 20; i++)
{
DataRow dr = dt.NewRow();
dr[0] = "Fluff";
dr[1] = "Fluff";
dr[2] = "Fluff";
dr[3] = "Fluff";
dt.Rows.Add(dr);
}
radGridView1.DataSource = dt;
radGridView1.MasterGridViewTemplate.Columns[0].Width = 350;
radGridView1.MasterGridViewTemplate.Columns[1].Width = 350;
radGridView1.MasterGridViewTemplate.Columns[2].Width = 350;
radGridView1.MasterGridViewTemplate.Columns[3].Width = 350;
}
}
}