473,396 Members | 1,933 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,396 software developers and data experts.

DataGrid controls

When handling the datagrid's OnEditCommand handler, the
DataGridCommandEventArgs has an Item property, which has a collection of
controls. One of these contains three subcontrols, the middle one (id 1 of 0,
1 and 2) of these subcontrols is the control (textbox) that contains the
value I want to update the datagrid's underlying data with.

My question is, short of doing two loops everytime to find the right
control, what is the best way of doing this?

Nov 18 '05 #1
2 869
Look at the FindControl method (e.item.findcontrol) which looks for multiple
layer sub-controls of the current control by ID

--
-Philip Rieck
http://philiprieck.com/blog/

-
"Bonj" <Bo**@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...
When handling the datagrid's OnEditCommand handler, the
DataGridCommandEventArgs has an Item property, which has a collection of
controls. One of these contains three subcontrols, the middle one (id 1 of
0,
1 and 2) of these subcontrols is the control (textbox) that contains the
value I want to update the datagrid's underlying data with.

My question is, short of doing two loops everytime to find the right
control, what is the best way of doing this?

Nov 18 '05 #2
Thanks!

"Philip Rieck" <ju**@mckraken.com> wrote in message
news:uM**************@tk2msftngp13.phx.gbl...
Look at the FindControl method (e.item.findcontrol) which looks for
multiple layer sub-controls of the current control by ID

--
-Philip Rieck
http://philiprieck.com/blog/

-
"Bonj" <Bo**@discussions.microsoft.com> wrote in message
news:0A**********************************@microsof t.com...
When handling the datagrid's OnEditCommand handler, the
DataGridCommandEventArgs has an Item property, which has a collection of
controls. One of these contains three subcontrols, the middle one (id 1
of 0,
1 and 2) of these subcontrols is the control (textbox) that contains the
value I want to update the datagrid's underlying data with.

My question is, short of doing two loops everytime to find the right
control, what is the best way of doing this?


Nov 18 '05 #3

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

Similar topics

3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
12
by: Daniel Walzenbach | last post by:
Hi, I want to display a Label in a DataGrid according to some condition. I therefore check whether the condition is true in the ItemDateBound EventHandler of the DataGrid. Unfortunately the...
9
by: tshad | last post by:
How do I find (and set) a couple of labels in the Footer after a DataGrid is filled? I have a bunch of DataGrids that get displayed nested inside a DataList. The datagrid looks like: ...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
0
by: optimizeit | last post by:
What I am attempting to do is import an Excel Workbook and display the worksheets in a datagrid dynamically. I am very close to getting this to work. I have to this point successfully imported a...
1
by: jimb | last post by:
I can get the dropdownlist into the datagrid, and I can populate it, but I can't read it. Anybody have a working example of a dropdownlist in an editable grid? Thanks. -- .....
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
0
by: rn5a | last post by:
Suppose I have the following DataGrid: <asp:DataGrid ID="dgUsers" OnUpdateCommand="UpdateDG" runat="server"> <Columns> <TemplateColumn HeaderText="NAME"> <ItemTemplate> <asp:Label...
0
by: arlie_maija | last post by:
Hey - I'm writing a control that contains a DataGrid, and I'm unable to get the update event to fire. When I click the update link, the edit event fires. heres the details... my control...
2
by: =?Utf-8?B?Y3JlYXZlczA2MjI=?= | last post by:
I have a nested datagrid in a xaml file, the parent datagrid loads the vendor information and the details loads the documents for that vendor in a datagrid. Everything is working fine until I 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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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.