Click here to Skip to main content
15,886,799 members
Home / Discussions / C#
   

C#

 
GeneralRe: Create events for windows User Control.Urgent!!! Pin
RenuKhot10-Oct-06 23:18
RenuKhot10-Oct-06 23:18 
Questionc# and xml Pin
moadbrkt10-Oct-06 16:37
moadbrkt10-Oct-06 16:37 
AnswerRe: c# and xml Pin
Andrei Ungureanu10-Oct-06 19:08
Andrei Ungureanu10-Oct-06 19:08 
GeneralRe: c# and xml Pin
moadbrkt11-Oct-06 12:51
moadbrkt11-Oct-06 12:51 
QuestionHow to use Repeater with c# code? Pin
Ah_Mohsen_aly10-Oct-06 15:55
Ah_Mohsen_aly10-Oct-06 15:55 
AnswerRe: How to use Repeater with c# code? Pin
Chris Buckett10-Oct-06 23:32
Chris Buckett10-Oct-06 23:32 
GeneralRe: How to use Repeater with c# code? Pin
Chris Buckett10-Oct-06 23:34
Chris Buckett10-Oct-06 23:34 
QuestionError: Unable to cast object of type *** to type *** [modified] Pin
Anthony Mushrow10-Oct-06 14:11
professionalAnthony Mushrow10-Oct-06 14:11 
I put this in m code:

public class Row : System.Windows.Forms.ListViewItem<br />
	{<br />
		public int id;<br />
		public int online;<br />
	}


And have this code

ListViewItem item = new ListViewItem(new string[] {reader[NAME].ToString(), reader[GAME].ToString(), reader[BNAME].ToString(), reader[BOARD].ToString()});<br />
				Row row = (Row)item;  <-- ERROR OCCURS HERE<br />
				row.id = Convert.ToInt32(reader[ID].ToString());<br />
				row.on1ine = Convert.ToInt32(reader[ONLINE].ToString());<br />
MainForm.listView1.Items.Add(row);


But i get the above error, that it couldn't cast ListViewItem as Row. Ive done this before with TreeNode and it all worked fine, what wrong with this one?

Why did my row.online get replaced with row.removed, it doesn't do it outside the code brackets?

-- modified at 20:31 Tuesday 10th October, 2006
QuestionRe: Error: Unable to cast object of type *** to type *** Pin
Anthony Mushrow10-Oct-06 16:11
professionalAnthony Mushrow10-Oct-06 16:11 
AnswerRe: Error: Unable to cast object of type *** to type *** Pin
S. Senthil Kumar10-Oct-06 17:19
S. Senthil Kumar10-Oct-06 17:19 
NewsRe: Error: Unable to cast object of type *** to type *** [modified] Pin
Anthony Mushrow10-Oct-06 17:32
professionalAnthony Mushrow10-Oct-06 17:32 
GeneralRe: Error: Unable to cast object of type *** to type *** Pin
monrobot1310-Oct-06 18:27
monrobot1310-Oct-06 18:27 
GeneralRe: Error: Unable to cast object of type *** to type *** Pin
Stefan Troschuetz10-Oct-06 22:04
Stefan Troschuetz10-Oct-06 22:04 
QuestionComboBox Drop down Forcolor change in disabled mode (Black color) Pin
Abhlu10-Oct-06 13:55
Abhlu10-Oct-06 13:55 
QuestionRe: ComboBox Drop down Forcolor change in disabled mode (Black color) Pin
Anthony Mushrow10-Oct-06 14:32
professionalAnthony Mushrow10-Oct-06 14:32 
AnswerRe: ComboBox Drop down Forcolor change in disabled mode (Black color) Pin
Abhlu10-Oct-06 15:41
Abhlu10-Oct-06 15:41 
GeneralRe: ComboBox Drop down Forcolor change in disabled mode (Black color) Pin
Anthony Mushrow10-Oct-06 15:53
professionalAnthony Mushrow10-Oct-06 15:53 
GeneralRe: ComboBox Drop down Forcolor change in disabled mode (Black color) Pin
Abhlu10-Oct-06 16:19
Abhlu10-Oct-06 16:19 
QuestionHow to solve this strong name issue? Pin
kolu narayan10-Oct-06 13:10
kolu narayan10-Oct-06 13:10 
AnswerRe: How to solve this strong name issue? Pin
led mike10-Oct-06 13:48
led mike10-Oct-06 13:48 
GeneralRe: How to solve this strong name issue? Pin
kolu narayan11-Oct-06 3:45
kolu narayan11-Oct-06 3:45 
GeneralRe: How to solve this strong name issue? Pin
kolu narayan11-Oct-06 5:21
kolu narayan11-Oct-06 5:21 
QuestionApp.Config and ConfigurationSection Pin
Jamie Nordmeyer10-Oct-06 13:07
Jamie Nordmeyer10-Oct-06 13:07 
AnswerRe: App.Config and ConfigurationSection Pin
led mike10-Oct-06 13:40
led mike10-Oct-06 13:40 
QuestionHow can I delete all files and subfolders within a directory ? Pin
Nadia Monalisa10-Oct-06 13:06
Nadia Monalisa10-Oct-06 13:06 

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.