473,503 Members | 8,131 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

access all items in a datagrid



I have a newbie (to asp.net) datagrid question. I have no trouble
reading all the cells in the current row of the datagrid from a
subroutine called by an event triggered by a change of a dropdown list
contained in the datagrid. (sorry about my excessive prepositional
phrases...)

However, I've been unable to figure out how to access other rows in the
datagrid. After updating this value, I want to be able to read through
the entire grid to see if the user has completed everything.

I'm certain there must be a way to do this, but haven't figured out the
magic words to make Google show me the way.

I realize that I can do a rebind and examine all elements one at a time,
but I believe that this only works for the current page of data, and I
need to be able to check the entire datagrid, not just what is being
displayed currently.

Best regards and many thanks in advance.

Bruce Dumes
Nov 19 '05 #1
1 1007
Bruce,

You can loop through myGrid.Items collection. An item represent a row. There
are different types of rows. You are probably mostly interested in data row
as opposed to header and footer. A good place to loop through all rows is
PreRender event. When you get there, all items are already fully built.

Eliyahu

"Bruce Dumes" <br********@dumes.net> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...


I have a newbie (to asp.net) datagrid question. I have no trouble
reading all the cells in the current row of the datagrid from a
subroutine called by an event triggered by a change of a dropdown list
contained in the datagrid. (sorry about my excessive prepositional
phrases...)

However, I've been unable to figure out how to access other rows in the
datagrid. After updating this value, I want to be able to read through
the entire grid to see if the user has completed everything.

I'm certain there must be a way to do this, but haven't figured out the
magic words to make Google show me the way.

I realize that I can do a rebind and examine all elements one at a time,
but I believe that this only works for the current page of data, and I
need to be able to check the entire datagrid, not just what is being
displayed currently.

Best regards and many thanks in advance.

Bruce Dumes

Nov 19 '05 #2

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

Similar topics

2
1533
by: Paul Daly (MCP) | last post by:
How do you access the value of a cell in a Windows form datagrid? I know this is how you would do it using an ASP.NET datagrid: DataGrid1.Items.Cells.Text However, "Items" is not available in...
4
5462
by: Kaung Htut O via DotNetMonster.com | last post by:
Hi to all Is there a way to access Datalist Footer's Control properties from outside of datalist event. Pls note that I mean not a datagrid, only for datalist. Thanks Kaung Htut Oo
1
1290
by: Raterus | last post by:
Hi, I'm using a datagrid, and the sub ItemDataBound to customize output of my datagrid when it is bound. Is the only way I can access the data in my datasource is to use ...
4
8279
by: jenn | last post by:
Hi Anyone knows how to access to a value of a row in a datalist. Something like this in datagrid Dim str = MyDataGrid.Cell(0).tex I would like something like this Dim str =...
0
1498
by: bill yeager | last post by:
I have a datalist displaying parent information and a datagrid presenting child information. The data is being rendered just fine. The datagrid has template columns on it that I cannot gain access...
1
1740
by: bill yeager | last post by:
I did some more debugging and found the following: 1) I placed the following code in the button event just to see if I could cycle thru the datagrid control collection: <code> Dim strhello As...
3
1233
by: Michael | last post by:
Does anyone know how to export a data grid from asp.net into microsoft access? Thanks. Michael
0
946
by: Elton Wang | last post by:
Hi Bruce, As Cor's suggestion, it's better to post Web DataGrid questions in either dotnet.framework.aspnet or more specially in dotnet.framework.aspnet.datagrid group. Anyway, following code...
2
1864
by: glenn | last post by:
Hi folks, Page_Load has the following definition: Sub Page_Load(sender as Object, e as EventArgs) As such, we are unable to instantiate a control that is inside a DataGrid since the e...
4
2100
by: _MC_ | last post by:
Hi, I'm unable to access values in my Datagrid. Datagrid thinks it hase only 1 Cell. So here it is: The Datagrid is binded in PageLoad, AutoGenerateColumns is false, Columns are added on...
0
7207
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
7093
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
7291
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
7357
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
7468
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
4690
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...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
402
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.