473,326 Members | 2,126 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,326 software developers and data experts.

Reference Datagrid cell contents

Hi. I have an asp:ImageButton which appears when a datagrid row is placed in
Edit mode. The button has it's own click event which fires when the button
is clicked. Within the button's click event, I need to reference the
contents of a cell within the record currently in edit mode.

For example...
The datagrid has 3 columns: ID, Name, Picture
When placed in edit mode my asp:ImageButton appears in the Picture column,
and the ID and Name fields become editable. Within the sub that handles the
asp:ImageButton click event, I need to reference the contents of the Name
column.

I've tried...
Dim Name as String
Name = (CType(DataGrid1.Items.Cells(2).Controls(0), TextBox).Text)
Which does not work.

How can I accomplish this? Thanks!
Nov 19 '05 #1
0 827

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

Similar topics

0
by: Jack Herr | last post by:
I am using the process of posting back to the datasource as a device to catch certain errors made to the data in a datagrid. (The datagrid is linked to the corresponding datatable via a dataview.) ...
11
by: Junkguy | last post by:
I need some help programmatically causing a row in a DataGrid to "flush" its contents to its bound data (in Visual Studio 6 using Windows Forms with C#). My issue is I want to send an update to...
1
by: pcPirate | last post by:
Hi, In C# i) Is there anyway to input value on particular cell in datagrid in the coding? ii) How do I save the contents of the datagrid back to database? iii) I've made a custom...
1
by: Sargas Atum | last post by:
Hi all, 1. I have a problem with cell selection in a table in a DataGrid. I dont want that anybody writes in the cells. That was not a problem I changed them to "read only", but if I am going...
2
by: Patrick | last post by:
I want a Windows Forms DataGrid that acts in some ways like a ListBox. It should behave like this: -> When you click on a cell, the entire row is highlighted (instead of just the contents of the...
2
by: MrMike | last post by:
Hi. I have an asp:ImageButton which appears when a datagrid row is placed in Edit mode. The button has it's own click event which fires when the button is clicked. Within the button's click...
0
by: Simon Tamman {Uchiha Jax} | last post by:
I had a problem with a datagrid a little while ago. '0' is not a valid value for 'value'. 'value' should be between 'minimum' and 'maximum' Strange problem that occured all the time, no...
2
by: Flack | last post by:
Hey guys, I have a DataGrid and DataTable field in my class : private ImageDataGrid dataGrid1; //ImageDataGrid extends dataGrid and just overides OnMouseDown private DataTable dt = new...
2
by: Peter | last post by:
ASP.NET 2003 In the DataGrid how do I select current cell value in the dropdown box when I click on the edit link, currently when I click on the edit link in the DataGrid the dropdown box...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.