Click here to Skip to main content
16,006,373 members
Home / Discussions / C#
   

C#

 
GeneralRe: Raising an event when a variable changes Pin
Ravi Bhavnani7-Jan-06 5:06
professionalRavi Bhavnani7-Jan-06 5:06 
GeneralRe: Raising an event when a variable changes Pin
Colin Angus Mackay7-Jan-06 5:08
Colin Angus Mackay7-Jan-06 5:08 
Questionweakly typed Event declaration Pin
peterchen6-Jan-06 22:56
peterchen6-Jan-06 22:56 
AnswerRe: weakly typed Event declaration Pin
Daniel Turini6-Jan-06 23:19
Daniel Turini6-Jan-06 23:19 
QuestionAccess components of a form from a control on the form Pin
eye_for_an_eye6-Jan-06 20:52
eye_for_an_eye6-Jan-06 20:52 
QuestionNeed to read the contents of .pdf file from C# Pin
Abhishek Gunjan6-Jan-06 20:14
Abhishek Gunjan6-Jan-06 20:14 
AnswerRe: Need to read the contents of .pdf file from C# Pin
BruceN7-Jan-06 0:37
BruceN7-Jan-06 0:37 
QuestionSelectedItem not working??? I'm stumped! Pin
SpeBeeTo6-Jan-06 19:47
SpeBeeTo6-Jan-06 19:47 
Hello,

I have a C# program I'm working on, and I finally got over a large hurdle, only to encounter the next. Laugh | :laugh: I finally am able to display an image in my form (Working on a PocketPC), as well as other info that is located in an XML file.

The problem is, is that I think the SelectedItem Property isn't syncing with the rest of the items....

Could someone tell me where i'm going wrong? I'd really appreciate input. Smile | :)

Here it goes:

<br />
	xmlFileName = "\\Program Files\\SmartDeviceApplication1\\fragenkatalog.xml";<br />
			xsdFileName = "\\Program Files\\SmartDeviceApplication1\\fragenkatalog.xsd";<br />
			FileStream FsXML = new FileStream(xmlFileName,FileMode.Open);<br />
			FileStream FsXSD = new FileStream(xsdFileName,FileMode.Open);<br />
			<br />
<br />
			XmlTextReader xtrXSD = new XmlTextReader(FsXSD);<br />
			fragenkatalogDS.ReadXmlSchema(xtrXSD);<br />
			xtrXSD.Close();<br />
			FsXSD.Close();<br />
<br />
			XmlTextReader xtrXML = new XmlTextReader(FsXML);<br />
			fragenkatalogDS.ReadXml(xtrXML);<br />
			xtrXML.Close();<br />
			FsXML.Close();<br />
<br />
		DataTable dt = fragenkatalogDS.Tables["fragenkatalog"];<br />
<br />
		ca_id.DataSource = dt;<br />
		ca_id.DisplayMember = "ca_titel";<br />
		string root = "\\Program Files\\SmartDeviceApplication1\\";<br />
		DataRowView drv = (DataRowView)ca_id.SelectedItem;<br />
<br />
		ca_bildurl.Image = new Bitmap(System.IO.Path.Combine(root,drv.Row["ca_bildurl1"].ToString()));<br />
			ca_titel.DataBindings.Add("Text",dt,"ca_titel");<br />
			ca_alter.DataBindings.Add("Text",dt,"ca_alter");<br />
			ca_sex.DataBindings.Add("Text",dt,"ca_sex");<br />
			burl.DataBindings.Add("Text",dt,"ca_bildurl1");<br />
<br />
		}


The problem I've been having (I think) is with this line:
DataRowView drv = (DataRowView)ca_id.SelectedItem;

It seems as though it's not displaying any other image other than the first one in the database. Any ideas?

Thanks a million!

Martina
AnswerRe: SelectedItem not working??? I'm stumped! Pin
kselman6-Jan-06 20:12
kselman6-Jan-06 20:12 
GeneralRe: SelectedItem not working??? I'm stumped! Pin
SpeBeeTo7-Jan-06 1:44
SpeBeeTo7-Jan-06 1:44 
AnswerRe: SelectedItem not working??? I'm stumped! Pin
SpeBeeTo7-Jan-06 7:37
SpeBeeTo7-Jan-06 7:37 
QuestionAlarm Clock Pin
monrobot136-Jan-06 19:00
monrobot136-Jan-06 19:00 
AnswerRe: Alarm Clock Pin
Ravi Bhavnani6-Jan-06 19:30
professionalRavi Bhavnani6-Jan-06 19:30 
GeneralRe: Alarm Clock Pin
monrobot137-Jan-06 10:07
monrobot137-Jan-06 10:07 
QuestionC# 2.0 ToolTip on ChildPanel Pin
kselman6-Jan-06 18:14
kselman6-Jan-06 18:14 
QuestionHow Create Code File Pin
raab20056-Jan-06 14:06
raab20056-Jan-06 14:06 
AnswerRe: How Create Code File Pin
Guffa6-Jan-06 14:34
Guffa6-Jan-06 14:34 
AnswerRe: How Create Code File Pin
AndrewPeters6-Jan-06 14:49
AndrewPeters6-Jan-06 14:49 
GeneralRe: How Create Code File Pin
raab20056-Jan-06 15:25
raab20056-Jan-06 15:25 
QuestionHelp Pin
aPerfectCircle6-Jan-06 11:56
aPerfectCircle6-Jan-06 11:56 
AnswerRe: Help Pin
Ravi Bhavnani6-Jan-06 12:01
professionalRavi Bhavnani6-Jan-06 12:01 
GeneralRe: Help Pin
aPerfectCircle7-Jan-06 15:05
aPerfectCircle7-Jan-06 15:05 
GeneralRe: Help Pin
Ravi Bhavnani8-Jan-06 5:24
professionalRavi Bhavnani8-Jan-06 5:24 
GeneralRe: Help Pin
aPerfectCircle8-Jan-06 5:47
aPerfectCircle8-Jan-06 5:47 
GeneralRe: Help Pin
Ravi Bhavnani8-Jan-06 5:50
professionalRavi Bhavnani8-Jan-06 5:50 

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.