This is a migrated thread and some comments may be shown as answers.

CellClick event fires on maximise

1 Answer 64 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Juzzer
Top achievements
Rank 2
Juzzer asked on 20 May 2008, 04:17 PM
**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;
        }
    }
}

1 Answer, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 22 May 2008, 03:31 PM
Hello Juzzer,

Please find the answer in the other support ticket you have opened, that refers to the same issue.

Greetings,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
GridView
Asked by
Juzzer
Top achievements
Rank 2
Answers by
Martin Vasilev
Telerik team
Share this question
or