My goal is to query table and add it to ListView. I only get an empty ListView with column names and errors. I used the tutorial, but it doesn't help. I realized that empty rows are added because I can click on them.
using (MySqlConnection connect = new MySqlConnection(connectionString))
{
connect.Open();
// QUERY GENERATION
mySqlCommand = new MySqlCommand(query, connect);
// QUERY PARAMETERS ADDED
ListStore store = new Gtk.ListStore(typeof(string[]));
for (int i = 0; i < tempselect.Length; i++) {
_treeView.AppendColumn(tempselect[i], new Gtk.CellRendererText(), "text");
}
MySqlDataReader reader = mySqlCommand.ExecuteReader();
while (reader.Read())
{
store.AppendValues(reader);
}
reader.Close();
_treeView.Model = store;
connect.Close();
}
There are no errors. The application just doesn't show data. There are data in the table. I'm trying to fix this for a whole day. Nothing works.
Thank you.