C# Sql tables in a DataGrid | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

C# Sql tables in a DataGrid

Hello, I'm working on a project where I have to search for a table and get all the values and show them in a Datagrid. The problem that I get is, that the Columns are shown double.. For example a Table with "Id" and "Name" would look like this: Id | Name | Id | Name What my question, is there a way to show a Different tables with different columns? I'm using Dapper and to save the values I use IEnumerable<dynamic>... But yeah the Data ist displayed twice Thanks in Advance for any hints

25th Nov 2019, 2:52 PM
Shahriayar Mustafa
Shahriayar Mustafa - avatar
5 Answers
+ 3
Try using listview and data binding. I assure you it is much more convenient. I understand that you write this on WPF or UWP? If you want, I can help you. Maybe your SQL query is not yet written?
26th Nov 2019, 3:50 AM
DIMANRUS
DIMANRUS - avatar
+ 1
You were told correctly, the sql adapter is used for reading.
26th Nov 2019, 7:51 AM
DIMANRUS
DIMANRUS - avatar
+ 1
What is your answer? Tell me how is this done?
27th Nov 2019, 5:25 PM
DIMANRUS
DIMANRUS - avatar
0
Thank you a lot, yesterday a collegue told me to use sqlAdapter and Datatable, now its working properly 😁👍
26th Nov 2019, 7:41 AM
Shahriayar Mustafa
Shahriayar Mustafa - avatar
0
give me answers plllllsllllellelelalalalsssse
27th Nov 2019, 4:52 PM
paka hafiz
paka hafiz - avatar