Click here to Skip to main content
16,005,080 members
Home / Discussions / C#
   

C#

 
Questionhow can i make a full row select in a datagrid Pin
-spy-20-Jun-07 1:52
-spy-20-Jun-07 1:52 
AnswerRe: how can i make a full row select in a datagrid Pin
Not Active20-Jun-07 2:24
mentorNot Active20-Jun-07 2:24 
AnswerRe: how can i make a full row select in a datagrid Pin
Stu Richardson20-Jun-07 3:35
Stu Richardson20-Jun-07 3:35 
QuestionProgramming processes in C# - concurrency [modified] Pin
Theghost20-Jun-07 1:22
Theghost20-Jun-07 1:22 
AnswerRe: Programming processes in C# - concurrency Pin
J4amieC20-Jun-07 3:01
J4amieC20-Jun-07 3:01 
QuestionKey Press event of textbox Pin
Sapan Roy20-Jun-07 1:10
Sapan Roy20-Jun-07 1:10 
AnswerRe: Key Press event of textbox Pin
Martin#20-Jun-07 1:16
Martin#20-Jun-07 1:16 
QuestionString Concatenation Issue Pin
Brendan Vogt20-Jun-07 0:44
Brendan Vogt20-Jun-07 0:44 
Hi,

I have an xml file that was exported by my function. There is 36 fields in the products table. Now a user can select which fields he/she wants to export to the xml file, below is an example of what the xml file looks like:

<Products>
<Product>
<ID>5555</ID>
<ProductName>Yellow Marker</ProductName>
<Price>4</Price>
<Status>1</Status>
<ShortDescription>Short Description</ShortDescription>
<LongDescription>Long Description</LongDescription>
</Product>
</Products>

The tag name, for example <ProductName /> is the name of the field, with the value of the field between the tags.

Now my Product class has properties for each field. I normally set my fields like this:

Product p = new Product();
p.ID = "5555";
p.ProductName = "Yellow Marker";
p.Price = 4;
p.Status = 1;
p.ShortDescription = "Short Description";
p.LongDescription = "Long Description";
etc., etc., etc...

Now I only want to populate the properties that occurs as a tag. I need to do this dynamically. How do I do this? I can do Product p = new Product(); by hard code, but how do I do p. and the name of the field together so that it is recognised as, for example p.Price?

I hope I am making sense.

Regards
ma se
AnswerRe: String Concatenation Issue Pin
Martin#20-Jun-07 0:51
Martin#20-Jun-07 0:51 
AnswerRe: String Concatenation Issue Pin
Sandeep Akhare20-Jun-07 0:59
Sandeep Akhare20-Jun-07 0:59 
Questionfile server Pin
sureshprabhu20-Jun-07 0:33
sureshprabhu20-Jun-07 0:33 
QuestionSerializing the same object instance twice... Pin
Shy Agam20-Jun-07 0:10
Shy Agam20-Jun-07 0:10 
AnswerRe: Serializing the same object instance twice... [modified] Pin
Martin#20-Jun-07 0:20
Martin#20-Jun-07 0:20 
AnswerRe: Serializing the same object instance twice... Pin
welbers20-Jun-07 0:29
welbers20-Jun-07 0:29 
AnswerRe: Serializing the same object instance twice... Pin
Shy Agam20-Jun-07 0:38
Shy Agam20-Jun-07 0:38 
Questionflicker free fast moving images Pin
wolf70719-Jun-07 23:53
wolf70719-Jun-07 23:53 
AnswerRe: flicker free fast moving images Pin
Martin#20-Jun-07 0:03
Martin#20-Jun-07 0:03 
QuestionCustomizing the grid columns Pin
minkinin19-Jun-07 23:23
minkinin19-Jun-07 23:23 
QuestionUse of trignometric func.??-----------help urgent Pin
Raza568019-Jun-07 23:17
Raza568019-Jun-07 23:17 
AnswerRe: Use of trignometric func.??-----------help urgent Pin
Giorgi Dalakishvili19-Jun-07 23:28
mentorGiorgi Dalakishvili19-Jun-07 23:28 
QuestionZooming in C# using opengl Pin
a_david12319-Jun-07 22:48
a_david12319-Jun-07 22:48 
AnswerRe: Zooming in C# using opengl Pin
a_david12325-Jun-07 20:35
a_david12325-Jun-07 20:35 
QuestionSocket Progamming using UDP Pin
ramdil19-Jun-07 22:31
ramdil19-Jun-07 22:31 
Questionhelp ... Pin
B.A19-Jun-07 22:17
B.A19-Jun-07 22:17 
Questionwindows service scheduler Pin
arkiboys19-Jun-07 22:04
arkiboys19-Jun-07 22:04 

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.