Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello,

Can any body explain Data Templates in WPF. I am new to WPF. I have 5 fields in a table called patient. Patient ID, Patient Name, Date of Birth, Address1, Address2, City, State, Zipcode. I need to show in the following scenario.
Patient 1
**********************************
*PatientID:SDXCF000                               *
*PatientName:John,Doe                            *
*Date 0f Birth:01/01/1964                         *
*Address1 : Temple Stree                          *
*Address2:Plot no 567                               *
*City : San Fransicso                                *
*State : SA                                             *
*Zipcode: 20171-1023                               *
***********************************
Patient 2
*********************************
*PatientID:SDXCF000                               *
*PatientName:John,Doe                            *
*Date 0f Birth:01/01/1964                         *
*Address1 : Temple Stree                          *
*Address2:Plot no 567                               *
*City : San Fransicso                                *
*State : SA                                             *
*Zipcode: 20171-1023                               *
***********************************
Patient 3
*********************************
*PatientID:SDXCF000                               *
*PatientName:John,Doe                            *
*Date 0f Birth:01/01/1964                         *
*Address1 : Temple Stree                          *
*Address2:Plot no 567                               *
*City : San Fransicso                                *
*State : SA                                             *
*Zipcode: 20171-1023                               *
***********************************
Patient 4
**********************************
*PatientID:SDXCF000                               *
*PatientName:John,Doe                            *
*Date 0f Birth:01/01/1964                         *
*Address1 : Temple Stree                          *
*Address2:Plot no 567                               *
*City : San Fransicso                                *
*State : SA                                             *
*Zipcode: 20171-1023                               *
***********************************

Hope i explined my self clearly.

chowdary.
Posted
Comments
[no name] 29-Aug-12 7:32am    
"i explined my self clearly"... no you have not explained yourself at all. What do data templates have to do with your "question"? What exactly is your question? What have you tried?
Charles Shob 29-Aug-12 12:08pm    
Mr. Was Adey,

As i already mentioned that i am new to WPF and learning. Did code project had any rule that we should try before we post or did i mentioned that i tried and failed??? I asked for help .. if you can answer else ..... Question cannot be answered with another question.

Chowdary.
[no name] 29-Aug-12 12:12pm    
Yes as a matter of fact it does. You should have read the guidelines before posting. I *could* have answered but your question is not clear with what it is that you are trying to do. You have not provided any indication that you have tried anything. And with your attitude, I am not inclined to help you.

1 solution

There is a very cool site around the net. The site what I talking about is very useful when you learn to use it.

That site is like a genius in a bottle. The only difference is that you should not rub the lamp at all. Just type your questions there :)

The site you can find here.

May be this helps you A Guided Tour of WPF – Part 4 (Data templates and triggers)[^]

Hope you can find it useful.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900