Click here to Skip to main content
15,917,005 members
Home / Discussions / C#
   

C#

 
AnswerRe: Problem with "Cannot implicitly convert type "string" to "int" While using 2 buttons on Windows form application Pin
AhmedMasum19-Oct-09 0:44
AhmedMasum19-Oct-09 0:44 
QuestionWeb site Ripper (Copier) in C# Pin
fireblade8018-Oct-09 13:56
fireblade8018-Oct-09 13:56 
AnswerRe: Web site Ripper (Copier) in C# Pin
Christian Graus18-Oct-09 14:06
protectorChristian Graus18-Oct-09 14:06 
AnswerRe: Web site Ripper (Copier) in C# Pin
N a v a n e e t h18-Oct-09 17:08
N a v a n e e t h18-Oct-09 17:08 
GeneralRe: Web site Ripper (Copier) in C# Pin
Luc Pattyn18-Oct-09 18:11
sitebuilderLuc Pattyn18-Oct-09 18:11 
GeneralRe: Web site Ripper (Copier) in C# Pin
N a v a n e e t h18-Oct-09 18:20
N a v a n e e t h18-Oct-09 18:20 
QuestionCannot set listview colum data correctly Pin
c#coder200918-Oct-09 13:34
c#coder200918-Oct-09 13:34 
AnswerRe: Cannot set listview colum data correctly Pin
N a v a n e e t h18-Oct-09 17:25
N a v a n e e t h18-Oct-09 17:25 
Here is adding the Item nodes into list view. You don't have to use LINQ. A simple XPath query should be enough.
XmlNodeList itemNodes = document.SelectNodes("/List/Item"); // assuming document is a XmlDocument instance.
foreach (XmlNode node in itemNodes)
{
    XmlAttribute nameAttribute = node.Attributes["Name"];
    XmlAttribute versionAttribute = node.Attributes["Version"];
    XmlAttribute filenameAttribute = node.Attributes["Filename"];

    // Adding to listview
    ListViewItem root = listViewObject.Items.Add(nameAttribute.Value);
    root.SubItems.Add(versionAttribute.Value);
    root.SubItems.Add(filenameAttribute.Value);
}
You need to set the View property of listview to Details.

c#coder2009 wrote:
Is there a way I can combine my query to get all the attributes for item with a specific name. Like being able to get 1.0 from One


Again a simple XPath query should do it.
XmlNode itemNode = document.SelectSingleNode("/List/Item[@Name='One']");
Look into the itemNode.Attributes collection.

Smile | :)

Best wishes,
Navaneeth

GeneralRe: Cannot set listview colum data correctly Pin
c#coder200918-Oct-09 18:06
c#coder200918-Oct-09 18:06 
GeneralRe: Cannot set listview colum data correctly Pin
N a v a n e e t h18-Oct-09 18:11
N a v a n e e t h18-Oct-09 18:11 
GeneralRe: Cannot set listview colum data correctly [modified] Pin
c#coder200918-Oct-09 18:25
c#coder200918-Oct-09 18:25 
GeneralRe: Cannot set listview colum data correctly Pin
N a v a n e e t h19-Oct-09 5:35
N a v a n e e t h19-Oct-09 5:35 
Questionborzoi 1.02 and C# Pin
adam syria18-Oct-09 11:41
adam syria18-Oct-09 11:41 
AnswerRe: borzoi 1.02 and C# Pin
Christian Graus18-Oct-09 14:07
protectorChristian Graus18-Oct-09 14:07 
QuestionWCF - Client Wait Other Client [modified] Pin
dataminers18-Oct-09 11:13
dataminers18-Oct-09 11:13 
AnswerRe: WCF - Client Wait Other Client Pin
Ravi Bhavnani18-Oct-09 18:11
professionalRavi Bhavnani18-Oct-09 18:11 
GeneralRe: WCF - Client Wait Other Client Pin
dataminers18-Oct-09 20:53
dataminers18-Oct-09 20:53 
AnswerRe: WCF - Client Wait Other Client [modified] Pin
Mirko198018-Oct-09 23:08
Mirko198018-Oct-09 23:08 
Questioncustom control events Pin
teknolog12318-Oct-09 10:00
teknolog12318-Oct-09 10:00 
AnswerRe: custom control events Pin
DaveyM6918-Oct-09 10:22
professionalDaveyM6918-Oct-09 10:22 
GeneralRe: custom control events Pin
teknolog12318-Oct-09 12:01
teknolog12318-Oct-09 12:01 
GeneralRe: custom control events Pin
Dave Kreskowiak18-Oct-09 12:51
mveDave Kreskowiak18-Oct-09 12:51 
GeneralRe: custom control events Pin
teknolog12319-Oct-09 5:29
teknolog12319-Oct-09 5:29 
QuestionSave everything but the blob to DB Pin
JRivord18-Oct-09 8:46
JRivord18-Oct-09 8:46 
AnswerRe: Save everything but the blob to DB Pin
Not Active18-Oct-09 9:28
mentorNot Active18-Oct-09 9:28 

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.