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

stepping thru the GridView1_RowDataBound event

hey all,
when i step thru the above event here's what I get for RowTypes

?e.Row.RowType

Header
DataRow (this is in red in the watch window)
DataRow (and this is in black)
Footer

what's the difference in colors or why 2 DataRows for one record?

thanks,
rodchar
Nov 21 '06 #1
3 2404
what's the difference in colors or why 2 DataRows for one record?
I think that you are a little confused here. There is only one DataRow per
record, however the Watch window does change color on every iteration of
e.Row.RowType. That is an interesting observation and it is a result of the
IDE color coding variables that have been changed (black for no change, red
for change).

So your output should be:

e.Row.RowType Header (Black)
e.Row.RowType DataRow (Red)
e.Row.RowType DataRow (Black)
e.Row.RowType Footer (Red)

for a table that has 2 rows.

Since the base types for the row is the same for header, datarow and footer,
the behaviour that you see is consistent. The first time around a new Datarow
row of type header is created, hence the black color. Then on the second
iteration, that variable's type gets changed to dataRow, hence the red color.
On the third iteration, the type stays the same, hence the black color
(unchanged). On the last iteration, the type gets changed to Footer, hence
the red color (changed).

Hope that gives you a clearer understanding of what the changing colors mean.

--
With Regards

Shailen Sukul
Architect
(BSc MCTS, MCSD.Net MCSD MCAD)
Ashlen Consulting Service P/L
(http://www.ashlen.net.au)
"rodchar" wrote:
hey all,
when i step thru the above event here's what I get for RowTypes

?e.Row.RowType

Header
DataRow (this is in red in the watch window)
DataRow (and this is in black)
Footer

what's the difference in colors or why 2 DataRows for one record?

thanks,
rodchar
Nov 22 '06 #2
That makes a lot of sense now, thank you for sharing that. rod.

"Shailen Sukul" wrote:
what's the difference in colors or why 2 DataRows for one record?
I think that you are a little confused here. There is only one DataRow per
record, however the Watch window does change color on every iteration of
e.Row.RowType. That is an interesting observation and it is a result of the
IDE color coding variables that have been changed (black for no change, red
for change).

So your output should be:

e.Row.RowType Header (Black)
e.Row.RowType DataRow (Red)
e.Row.RowType DataRow (Black)
e.Row.RowType Footer (Red)

for a table that has 2 rows.

Since the base types for the row is the same for header, datarow and footer,
the behaviour that you see is consistent. The first time around a new Datarow
row of type header is created, hence the black color. Then on the second
iteration, that variable's type gets changed to dataRow, hence the red color.
On the third iteration, the type stays the same, hence the black color
(unchanged). On the last iteration, the type gets changed to Footer, hence
the red color (changed).

Hope that gives you a clearer understanding of what the changing colors mean.

--
With Regards

Shailen Sukul
Architect
(BSc MCTS, MCSD.Net MCSD MCAD)
Ashlen Consulting Service P/L
(http://www.ashlen.net.au)
"rodchar" wrote:
hey all,
when i step thru the above event here's what I get for RowTypes

?e.Row.RowType

Header
DataRow (this is in red in the watch window)
DataRow (and this is in black)
Footer

what's the difference in colors or why 2 DataRows for one record?

thanks,
rodchar
Nov 27 '06 #3
No probs mate.
Just a reminder to close this post if you are happy with the answer.
Thanks.

--
Good luck!

Shailen Sukul
Architect
(BSc MCTS, MCSD.Net MCSD MCAD)
Ashlen Consulting Service P/L
(http://www.ashlen.net.au)
"rodchar" wrote:
That makes a lot of sense now, thank you for sharing that. rod.

"Shailen Sukul" wrote:
what's the difference in colors or why 2 DataRows for one record?
I think that you are a little confused here. There is only one DataRow per
record, however the Watch window does change color on every iteration of
e.Row.RowType. That is an interesting observation and it is a result of the
IDE color coding variables that have been changed (black for no change, red
for change).

So your output should be:

e.Row.RowType Header (Black)
e.Row.RowType DataRow (Red)
e.Row.RowType DataRow (Black)
e.Row.RowType Footer (Red)

for a table that has 2 rows.

Since the base types for the row is the same for header, datarow and footer,
the behaviour that you see is consistent. The first time around a new Datarow
row of type header is created, hence the black color. Then on the second
iteration, that variable's type gets changed to dataRow, hence the red color.
On the third iteration, the type stays the same, hence the black color
(unchanged). On the last iteration, the type gets changed to Footer, hence
the red color (changed).

Hope that gives you a clearer understanding of what the changing colors mean.

--
With Regards

Shailen Sukul
Architect
(BSc MCTS, MCSD.Net MCSD MCAD)
Ashlen Consulting Service P/L
(http://www.ashlen.net.au)
"rodchar" wrote:
hey all,
when i step thru the above event here's what I get for RowTypes
>
?e.Row.RowType
>
Header
DataRow (this is in red in the watch window)
DataRow (and this is in black)
Footer
>
what's the difference in colors or why 2 DataRows for one record?
>
thanks,
rodchar
Nov 27 '06 #4

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

Similar topics

0
by: Dean Slindee | last post by:
Anybody got this working or know of explicit instructions on how to get debug stepping thru a stored procedure with Visual Studio .NET and Windows 2000 OS? I get this error message "Unable to...
0
by: craig | last post by:
When stepping though C# code in Visual Studio, often times a line of code will cause an event handler to be run. However, it appears that the debugger will not automatically step into that event...
6
by: BBFrost | last post by:
I'm using Net 1.1 (2003) SP1 & Windows 2000 Here's the issue ... Rows 12 thru 24 are selected in a datagrid. The user now unselects rows 12 thru 24 and selects rows 45 thru 70 ??? How can...
0
by: Edwin Knoppert | last post by:
I want to use auto-generate fields mode on a gridview. Is it possible for formatting reasons to determine the db-fieldtype from within this event? Thanks!
3
by: sloan | last post by:
How does one "pass thru" a Raised Event.... I am using the Adapter Pattern to sync up some different interfaces. http://www.dofactory.com/Patterns/PatternAdapter.aspx My Question is this:
1
grs5211
by: grs5211 | last post by:
Visual Studio 2005 on XP sp2 ComboBox events I have a simple comboBox that is bound to some data. While stepping down the list I want to be able to show a little popup with supplimental...
3
by: Ben | last post by:
Hi, i'm a little bit confused about the events GridView1_RowDataBound and GridView1_RowCreated. 1) Which is executed first? 2) if i want to fetch the value of a field using this code: dim a...
15
by: postman | last post by:
Any idea why code would work as intended when setting a breakpoint and stepping through it line by line, but won't work correctly at run-time? The code is too much to post, so I hope this summary...
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: 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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.