✅ ListView Not Showing real values
I am filling the data from my SqlServer to display it on listview but it is showing system.data.data.rowview
here is my code-
'using System.Data;
using System.Data.SqlClient;
using System.Windows;
using System.Windows.Controls;
namespace Demo_APP
{
public partial class ManageStock : Window
{
DBAccess dBAccess = new DBAccess();
DataTable dt = new DataTable();
public ManageStock()
{
InitializeComponent();
LoadList();
}
public void LoadList() {
string query = "select * from DesignTB";
dBAccess.readDatathroughAdapter(query, dt);
ListView.ItemsSource = dt.DefaultView;
dBAccess.closeConn();
}
}
}
3 Replies
Oh ok I had seen a yt video once before and he had done it in this way so I just copied him
Yes it's wpf
Thank you I will try doing this
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.