473,399 Members | 3,888 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,399 software developers and data experts.

Finding Grid controls

I have been unable to find an elegant way to navigate to the controls in a
DataGrid in edit mode in order to get the changed values. I end up with a
lot of code like:

e.Item.Controls(5).Controls(0)

to get at a simple textbox, or:

e.Item.Controls(5).Controls(1)

if there is a multiline text box.

No ID's seem to end up on these controls, and I can't seem to find a
generalizable, clean way to access them. Any ideas?

Regards - Rick
Nov 17 '05 #1
1 1283
I don't know if this is OK for you but I sometimes use template columns,
then I name the controls in design mode, and access them this way :

Dim txt as Textbox
txt=ctype(e.Item.fincontrols("txtName"), Textbox)

"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:uS**************@TK2MSFTNGP10.phx.gbl...
I have been unable to find an elegant way to navigate to the controls in a
DataGrid in edit mode in order to get the changed values. I end up with a
lot of code like:

e.Item.Controls(5).Controls(0)

to get at a simple textbox, or:

e.Item.Controls(5).Controls(1)

if there is a multiline text box.

No ID's seem to end up on these controls, and I can't seem to find a
generalizable, clean way to access them. Any ideas?

Regards - Rick

Nov 17 '05 #2

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

Similar topics

3
by: SAM | last post by:
Hey guys, Long time Access programmer, but never had to bother with these things until now. First, I use ADO all the time in VB, but now I need to use it in Access 2K. I never remember/know...
9
by: Michael Howes | last post by:
I'm looking for a power grid control to use for some C#/Windows forms development. There are a LOT of grids out there and trying to analyzes them could turn into a long task. Some things I'm...
3
by: Rob | last post by:
You can find datagrid in page by refering the form. Gatagrid is a child control of Form. Here is the code ----------------- Dim ctl As New Control For Each ctl In...
0
by: Jeff | last post by:
I'm having a problem updating a DataGrid when using the grid's in-place editing features. I believe that my major problem is locating the row in the dataset that matches the row in the grid. Does...
6
by: Paul | last post by:
Hi I have 2 data grids and several controls on a web page. The grids will vary in size, just wondering if the lower grid could be covered by part of the upper grid depending on its size or is there...
2
by: hansiman | last post by:
When I want to add a js confirm box to a delete button that is positioned in the last column in a datagrid row I do the following in the ItemDataBound event: Dim delBtn As LinkButton =...
6
by: Tom | last post by:
I need to make up a 'grid' of controls at run time. The controls (of which I wrote) I will instantiate, then I need to arrange these in a row/column layout. For example, let's say I instantiate 20...
2
by: Tom | last post by:
I need to display a series of controls (in my case, a custom control) in a grid-like fashion. This means this particular control would be repeated multiple times, arranged in a row/column format....
1
by: sonali_aurangabadkar | last post by:
i want to edit whole grid on singel button click
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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,...
0
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...

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.