473,509 Members | 2,950 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to visit the invisible column

I have a datagridview filled with data from an external table.
I store the Key field in the first column and make it invisible.
But I want to visit this invisible column to get the Key data when
I double-click a selected row. How can i do? Thanks in advance.

Jun 4 '07 #1
2 1272
Try code like:

Dim key as Object = dataGridView1("HiddenColName",
e.RowIndex).Value

This assumes you hide the column using

dataGridView1.Columns("HiddenColName").Visible = False

=====================
Clay Burch
Syncfusion, Inc.

Jun 4 '07 #2
ssailor,

When you click on a cell, it should raise a CellClick event.
http://msdn2.microsoft.com/en-us/lib...cellclick.aspx

From this event handler, you can get to the row, and then pull the cells by
index.

Private Sub dataGridView1_CellClick(ByVal sender As Object, _
ByVal e As DataGridViewCellEventArgs) _
Handles dataGridView1.CellClick

If turn.Text.Equals(gameOverString) Then Return

Dim cell As DataGridViewImageCell = _
CType(dataGridView1.Rows(e.RowIndex). _
Cells(e.ColumnIndex), DataGridViewImageCell)
If (cell.Value Is blank) Then
If IsOsTurn() Then
cell.Value = o
Else
cell.Value = x
End If
ToggleTurn()
ToolTip(e)
End If
If IsAWin() Then
turn.Text = gameOverString
End If
End Sub

Hope this helps,
Steve
"ssailor" <ss********@hotmail.comwrote in message
news:11**********************@i38g2000prf.googlegr oups.com...
>I have a datagridview filled with data from an external table.
I store the Key field in the first column and make it invisible.
But I want to visit this invisible column to get the Key data when
I double-click a selected row. How can i do? Thanks in advance.

Jun 4 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2534
by: Susan Geller | last post by:
I have a table server control (System.Web.UI.WebControls.Table) on my form that has three columns. Sometimes I need the second column to be invisible, sometimes the third. How can I set a column...
3
2879
by: rockdale | last post by:
Hi, All: I have a datagrid with TemplateColumn as following: <asp:TemplateColumn Visible="False" > <ItemStyle Width="0px"></ItemStyle> <ItemTemplate> <asp:Label id="lblMin_Value"...
9
4777
by: Mel | last post by:
I have 10 columns total. 3 of them are invisible. The rest are read- only BoundFields, 3 of which are editable fields using TemplateFields. Upon editing, I want to validate what the user enters...
5
7274
by: my.shabby.sheep | last post by:
Hi, I want to do the following. I want to make a table column invisible to the screen, but I still want to be able to get the innertext that would have been stored in the cell for certain...
0
7136
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
7344
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7412
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
7505
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...
0
5652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
441
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.