Click here to Skip to main content
15,922,512 members
Home / Discussions / C#
   

C#

 
AnswerRe: help to create inventory system?? Pin
Colin Angus Mackay24-Sep-07 3:30
Colin Angus Mackay24-Sep-07 3:30 
QuestionThe equivalent of 'hello world' when it comes to custom events?! Pin
Dave2560024-Sep-07 2:25
Dave2560024-Sep-07 2:25 
AnswerRe: The equivalent of 'hello world' when it comes to custom events?! Pin
martin_hughes24-Sep-07 3:46
martin_hughes24-Sep-07 3:46 
QuestionGenerate C# code from Visio diagrams Pin
Krishnaraj Barvathaya B24-Sep-07 1:55
Krishnaraj Barvathaya B24-Sep-07 1:55 
QuestionVirtual listview Pin
Hampus@foi24-Sep-07 1:40
Hampus@foi24-Sep-07 1:40 
AnswerRe: Virtual listview Pin
mav.northwind24-Sep-07 2:07
mav.northwind24-Sep-07 2:07 
GeneralRe: Virtual listview Pin
Hampus@foi24-Sep-07 2:13
Hampus@foi24-Sep-07 2:13 
GeneralRe: Virtual listview Pin
mav.northwind24-Sep-07 8:19
mav.northwind24-Sep-07 8:19 
QuestionAdvice on WCF configurations Pin
BigBenDk24-Sep-07 1:38
BigBenDk24-Sep-07 1:38 
AnswerRe: Advice on WCF configurations Pin
Pete O'Hanlon24-Sep-07 1:55
mvePete O'Hanlon24-Sep-07 1:55 
GeneralRe: Advice on WCF configurations Pin
BigBenDk24-Sep-07 2:02
BigBenDk24-Sep-07 2:02 
QuestionCreating crystal report for windows applications Pin
iet200024-Sep-07 1:21
iet200024-Sep-07 1:21 
AnswerRe: Creating crystal report for windows applications Pin
Pete O'Hanlon24-Sep-07 2:01
mvePete O'Hanlon24-Sep-07 2:01 
GeneralRe: Creating crystal report for windows applications Pin
iet200024-Sep-07 2:23
iet200024-Sep-07 2:23 
GeneralRe: Creating crystal report for windows applications Pin
Justin Perez24-Sep-07 2:28
Justin Perez24-Sep-07 2:28 
GeneralRe: Creating crystal report for windows applications Pin
Malcolm Smart24-Sep-07 9:39
Malcolm Smart24-Sep-07 9:39 
GeneralRe: Creating crystal report for windows applications Pin
iet200025-Sep-07 1:38
iet200025-Sep-07 1:38 
QuestionWCF and Endpoint address Pin
KrunalC24-Sep-07 0:50
KrunalC24-Sep-07 0:50 
QuestionSending data from a listview to any location Pin
riedahoosain24-Sep-07 0:11
riedahoosain24-Sep-07 0:11 
AnswerRe: Sending data from a listview to any location Pin
Lutosław24-Sep-07 0:25
Lutosław24-Sep-07 0:25 
All data in items of ListView is contained in ListView.Items collection.
private void Form1_Load(object sender, EventArgs e)
{
	for (int i = 0; i < 100; i++) {
		listView1.Items.Add(new ListViewItem(new string[] { "Product " + i.ToString(), i.ToString()}));
	}
}

private void label1_Click(object sender, EventArgs e)
{
	int sum = 0;
	listBox1.Items.Clear();
	foreach (ListViewItem item in listView1.Items) {
		sum += int.Parse(item.SubItems[1].Text);
		listBox1.Items.Add(item.Text + ": " + item.SubItems[1].Text);
	}
	label1.Text = "Sum: " + sum.ToString();
}

This code assumess that you have a listBox1, listView1, label1 and the listView1 has two columns : "Product Name" and "Price"

Greetings - Gajatko

Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.

GeneralRe: Sending data from a listview to any location Pin
riedahoosain24-Sep-07 0:59
riedahoosain24-Sep-07 0:59 
GeneralRe: Sending data from a listview to any location Pin
Lutosław24-Sep-07 1:07
Lutosław24-Sep-07 1:07 
QuestionHelp regarding images in datagridview Pin
anu8123-Sep-07 23:47
anu8123-Sep-07 23:47 
QuestionPanel resize problem Pin
stancrm23-Sep-07 23:27
stancrm23-Sep-07 23:27 
AnswerRe: Panel resize problem Pin
Lutosław23-Sep-07 23:38
Lutosław23-Sep-07 23:38 

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.