Click here to Skip to main content
15,891,513 members
Home / Discussions / C#
   

C#

 
GeneralRe: Custom Control expandable property ordering. Pin
Martin#11-Jan-10 4:01
Martin#11-Jan-10 4:01 
QuestionMouse Wheel Scroll Pin
Pavan Navali11-Jan-10 0:44
Pavan Navali11-Jan-10 0:44 
AnswerRe: Mouse Wheel Scroll Pin
Covean11-Jan-10 1:35
Covean11-Jan-10 1:35 
AnswerRe: Mouse Wheel Scroll Pin
PIEBALDconsult11-Jan-10 3:52
mvePIEBALDconsult11-Jan-10 3:52 
QuestionLooping through XMLNodeList problem Pin
jamesc6910-Jan-10 23:32
jamesc6910-Jan-10 23:32 
AnswerRe: Looping through XMLNodeList problem Pin
Keith Barrow11-Jan-10 0:00
professionalKeith Barrow11-Jan-10 0:00 
GeneralRe: Looping through XMLNodeList problem Pin
jamesc6911-Jan-10 0:05
jamesc6911-Jan-10 0:05 
GeneralRe: Looping through XMLNodeList problem [modified] Pin
Keith Barrow11-Jan-10 0:11
professionalKeith Barrow11-Jan-10 0:11 
Can you post fuller code?
Also is the code being called the correct number of times (ie twice) even if the code is only setting from one node?

[Edit]
I ran this scratch code:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml("<HotelAvail><Rooms><Room><RoomRQId>1</RoomRQId><Quantity>1</Quantity><NumAdults>3</NumAdults></Room><Room><RoomRQId>2</RoomRQId><Quantity>1</Quantity><NumAdults>2</NumAdults></Room></Rooms></HotelAvail>");

XmlNodeList nodeRooms = xmlDoc.SelectNodes("HotelAvail/Rooms/Room");
foreach (XmlNode objRNode in nodeRooms)
{
    Console.Write(objRNode["RoomRQId"].InnerText);
    Console.Write("\t");
    Console.Write(objRNode["Quantity"].InnerText);
    Console.Write("\t");
    Console.WriteLine(objRNode["NumAdults"].InnerText);
}

Console.ReadKey();


This code outputs as expected:

1    1    3
2    1    2



So it is something else inside the loop causing the problem

CCC solved so far: 2 (including a Hard One!)
37!?!! - Randall, Clerks

modified on Monday, January 11, 2010 6:20 AM

GeneralRe: Looping through XMLNodeList problem Pin
jamesc6911-Jan-10 0:23
jamesc6911-Jan-10 0:23 
GeneralRe: Looping through XMLNodeList problem Pin
Luc Pattyn11-Jan-10 0:47
sitebuilderLuc Pattyn11-Jan-10 0:47 
GeneralRe: Looping through XMLNodeList problem Pin
Keith Barrow11-Jan-10 0:54
professionalKeith Barrow11-Jan-10 0:54 
GeneralRe: Looping through XMLNodeList problem Pin
jamesc6911-Jan-10 1:08
jamesc6911-Jan-10 1:08 
GeneralRe: Looping through XMLNodeList problem Pin
Keith Barrow11-Jan-10 1:35
professionalKeith Barrow11-Jan-10 1:35 
GeneralRe: Looping through XMLNodeList problem Pin
Luc Pattyn11-Jan-10 2:09
sitebuilderLuc Pattyn11-Jan-10 2:09 
GeneralRe: Looping through XMLNodeList problem Pin
Keith Barrow11-Jan-10 2:23
professionalKeith Barrow11-Jan-10 2:23 
GeneralRe: Looping through XMLNodeList problem Pin
jamesc6911-Jan-10 2:33
jamesc6911-Jan-10 2:33 
GeneralRe: Looping through XMLNodeList problem Pin
Keith Barrow11-Jan-10 3:00
professionalKeith Barrow11-Jan-10 3:00 
AnswerRe: Looping through XMLNodeList problem Pin
#realJSOP11-Jan-10 3:31
mve#realJSOP11-Jan-10 3:31 
QuestionHow do I get the location and size of the upper leftmost cell in a DataGridView? Pin
arnold_w10-Jan-10 22:25
arnold_w10-Jan-10 22:25 
AnswerRe: How do I get the location and size of the upper leftmost cell in a DataGridView? Pin
sanforjackass10-Jan-10 23:55
sanforjackass10-Jan-10 23:55 
GeneralRe: How do I get the location and size of the upper leftmost cell in a DataGridView? Pin
arnold_w11-Jan-10 0:02
arnold_w11-Jan-10 0:02 
Questionappending text Pin
Member 59031010-Jan-10 22:23
Member 59031010-Jan-10 22:23 
AnswerRe: appending text Pin
Nicholas Butler10-Jan-10 22:27
sitebuilderNicholas Butler10-Jan-10 22:27 
AnswerRe: appending text Pin
Abhinav S10-Jan-10 22:59
Abhinav S10-Jan-10 22:59 
QuestionCant Write Large Text File Pin
salamonty8610-Jan-10 21:49
salamonty8610-Jan-10 21:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.