There is a table in SQLite type:
row column value
1 ------------- 1 ------------ 2
2 ------------- 1 ------------ 5

etc.
Thus, it turns out that row 1 and column 1 of the DataGrid should contain the value 2, row 2, column 1 the value 5.
How can this be implemented (example below) or direct where to read?
I know that the DataGrid has an ItemSource property in Columns and Rows.
In this case, all other cells for which the value is not equal to 1 should be set to zero.

How can I fill in DataGrid 1 to 1 from SQLite, I figured it out, but I can not understand how to use known rows and columns.

enter image description here

  • it is not clear exactly what part of the problem is caused by the implementation - user227049
  • Edited first post - Antonem

1 answer 1

Take your reader, each line is a separate entity, sealed in ObservableCollection<> and "slip" in the DataGrid . And read about Binding, OOP and MVVM.

  • I read about Binding, now I'm trying to work with it, as well as with ObservableCollection <> and SQLiteDataReader. And on MVVM, I'm afraid to take it, because will have to redo everything that is already there. - Antonem
  • It turns out, if I have 100 lines, then there will be 100 entities? - Antonem