473,394 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

DatagridView Column Double Click

I'm fairly new at working with datagrids and this problem is bugging the hell out of me. Can someone please lead me in the right direction as to how to prevent a user from double clicking a column header. The following code reflects what is supposed to happen when the user double clicks the grid,but i get a massive error when people double click on the column headers:

CellToDelete = dtgFE1.Rows[e.RowIndex].Cells[0].FormattedValue.ToString();

string Message = "Do you want to delete this record?";
string caption = "Notice";
DialogResult result;

result = MessageBox.Show(Message, caption, MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
if (result == DialogResult.OK)
{
SystemDeleteRecord();
}
if (dtgFE1.DataSource != null)
{
dtgFE1.DataSource = RetrieveDataGridsData.GetFEData1();
dtgFE1.DataMember = "System";
}
else
{
MessageBox.Show("There are no more records associated with this call");
}

Any help would absutely be appreciated.

Thanks in advance.
Apr 10 '08 #1
0 769

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Rich | last post by:
Hello, I am reading data from a sql server table that is under replication. This table has the replicatin GUID column that is generated with replicatin. I am reading the data from a...
0
by: DBC User | last post by:
Hi, I have a datagridview, with column header and on the lefthandside the rowselector. I would like to do the following 2 1. When the user click ONLY the row selector or inside the gridview...
0
by: cris.b | last post by:
Hi, I have a problem with a DataGridView that has a readonly column of type "bool" When i click on a cell of that column the value doesn't change (OK) but after, all the form seems frozen! I can...
4
by: Michael Torville | last post by:
Does anyone know if it's possible to prevent a user from entering a particular "DataGridView" cell. I simply want to redirect them into the next available cell but nothing I try works. Setting the...
4
by: gregarican | last post by:
I have a standard VC# 2005 DataGridView showing a group of records coming from a table. Currently I have a CellMouseDoubleClick event popping up a MessageBox which pulls a timestamp of the...
1
by: PawelR | last post by:
Hi Group, In my application I have DataTable which is displayed in DataGridView via DataView: DataView myView = new DataView(myTable); myDataGridView.DataSource = myView; One column im...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
1
by: TG | last post by:
Hi! I have an application in which I have some checkboxes and depending which ones are checked those columns will show in the datagridview from sql server or no. After that I have 2 buttons:...
6
by: Miro | last post by:
Sorry for the cross post. I am stuck. I have a datagridview for poker rounds. Basically there are 3 columns in this datagridview. "Round" "SmallBlind" "BigBlind" I have an issue when I tab...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.