将可观察的集合绑定到数据库/数据表和datagrid到observeablecollection [英] Bind observeable collection to database/datatable and datagrid to observeablecollection
问题描述
我有一个带有2列的.mdb数据库(注意:column1的数据类型是`OLE OBJECT`-它存储图像,column2的数据类型是`短文本`或简单的单词 - `string` )b
现在我想要的是,我希望有一个`ObserveAbleCollection`,它将从数据库中加载数据(我可能不会这么说,因为我真的不喜欢我不太了解它或数据库(从数据库中填充)。我可能会关注[this](stackoverflow.com/questions/24539022/how-to-bind-wpf-datagrid-to-observablecollection)
但是再次,OP没有使用数据库/数据表(或者我不明白?)。
然后我想绑定一个数据网格到`ObserverAbleCollection`以便我可以使用atextbox过滤数据网格(参考 - (stackoverflow.com/questions/15568325/filter-a-datagrid-in-wpf))
任何帮助将不胜感激!
I have a .mdb database with 2 columns(Note : column1's datatype is `OLE OBJECT`- it stores images , column2's datatype is `Short text` or in simple words-`string`)
Now what i want is, i want to have an `ObserveAbleCollection` which will load data from the database(i may not be asking this properly as i really don't know much about it) or a datatabe(which is populated from the database).I might follow [this](stackoverflow.com/questions/24539022/how-to-bind-wpf-datagrid-to-observablecollection)
but again,the OP didn't use a database/datatable(or maybe i don't understand ?).
Then i want to bind a datagrid to the `ObserverAbleCollection` so that i can filter the datagrid late with a atextbox(reference - (stackoverflow.com/questions/15568325/filter-a-datagrid-in-wpf))
Any help will be appreciated !
推荐答案
我有一个包含2列的.mdb数据库(否) te:column1的数据类型是`OLE OBJECT`-它存储图像,column2的数据类型是`Short text`或简单的单词-string`)
现在我想要的是的,我希望有一个`ObserveAbleCollection`,它将从数据库中加载数据(我可能没有正确地问这个,因为我真的不太了解它)或数据库(从数据库中填充)。我可能按[this](stackoverflow.com/questions/24539022/how-to-bind-wpf-datagrid-to-observablecollection)
但是再次,OP没有使用数据库/数据表(或者我不喜欢'理解?)。)
然后我想将数据网格绑定到`ObserverAbleCollection`,以便我可以使用atextbox过滤数据网格(引用 - (stackoverflow。 com / questions / 15568325 / filter-a-datagrid-in-wpf))
任何帮助将不胜感激!
I have a .mdb database with 2 columns(Note : column1's datatype is `OLE OBJECT`- it stores images , column2's datatype is `Short text` or in simple words-`string`)
Now what i want is, i want to have an `ObserveAbleCollection` which will load data from the database(i may not be asking this properly as i really don't know much about it) or a datatabe(which is populated from the database).I might follow [this](stackoverflow.com/questions/24539022/how-to-bind-wpf-datagrid-to-observablecollection) but again,the OP didn't use a database/datatable(or maybe i don't understand ?).
Then i want to bind a datagrid to the `ObserverAbleCollection` so that i can filter the datagrid late with a atextbox(reference - (stackoverflow.com/questions/15568325/filter-a-datagrid-in-wpf))
Any help will be appreciated !
这篇关于将可观察的集合绑定到数据库/数据表和datagrid到observeablecollection的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!