简体   繁体   中英

How to update gridview when selectedvalue of combobox is changed WPF

Well what I'm trying to do is I have a table which has information about all the patient. I have retrieved names of all the patient in combobox . Now what I have to do is when a user selects particular name from combobox then the gridview should get updated with the details of selected patient..

I have searched a lot on this but was unable to find the exact help. I'm new to WPF technology so any help would do. Thank you.

Hi so using a GridView is mostly used to set a specific layout not to display data. What you want to do is use a DataGrid and than set the ItemsSource to it.

In the case that you want to display only a single "row" of information than you should probably use a Label and set it's Content.

Hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM