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

C#

 
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 
GeneralRe: Looping through XMLNodeList problem Pin
jamesc6911-Jan-10 0:23
jamesc6911-Jan-10 0:23 
The entire project is huge and references several classes, so it's impossible to include the whole code, below is a more concise example of what is occuring.   Basically for every occurence of the "Room" node, I populate a datatable with the variables, and then write an output.   It loops through my for each loop twice, but sets the variables each time to the first occurence only.   And therefore I get two nodes output, which are both derived from the first datatable created, and the first set of room child nodes in the xml document.   The rest of this project is working 100% perfectly, but this is the only area where I need to loop through a list of nodes, as all other nodes occur once.

XmlNodeList nodeRooms = xmlDoc.SelectNodes("/test:HotelAvail/test:Rooms/test:Room", ns);
foreach (XmlNode objRNode in nodeRooms)
{
intRoomRQId = int.Parse(objRNode["RoomRQId"].InnerText);
strQuantity = objRNode["Quantity"].InnerText;
intNumAdults = int.Parse(objRNode["NumAdults"].InnerText);
DataTable dt = objAvailability.SelectHotelAvail(intRoomRQId, strQuantity, intNumAdults);
if (dt.Rows.Count >0)
{
   objWriter.WriteStartElement("Room");
   objWriter.WriteStartElement("RoomRQId");
   objWriter.WriteString(intRoomRQId.ToString());
   objWriter.WriteEndElement(); //RoomRQID
   ..... other items from datatable are written here
}
}
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 
AnswerRe: Cant Write Large Text File Pin
Covean10-Jan-10 22:13
Covean10-Jan-10 22:13 

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.