Cannot bind data control so it displays changes in EF objects
I am having a problem with an application to display data that I manully add to EF classes and save it in the database. They just do not show up.
I am using ObservableCollection which shudl tell the datagrid that the changes happened.
Attachment: BlackBookWPFCore_df5b37e9.zip
SIGN IN To post a reply.
9 Replies
VS
Vijayarasan Sivanandham
Syncfusion Team
February 19, 2020 05:21 PM UTC
Hi Mariusz Juszkiewicz,
Thank you for contacting Syncfusion support.
We have tried to run the demo application share by you. But we are facing below issue
Could you please revert us with SQL Server database file? It will help us to investigate further and provide you earlier prompt solution.
Regards,
Vijayarasan S
MJ
Mariusz Juszkiewicz
February 20, 2020 04:44 AM UTC
Vijayarasan,
You need to set connection string to your SQL server application will generate the database by itself. Connection string is in file MainFormContext.cs.
@"Server=.;Database=BlackBookEPFCore;Trusted_Connection=True;MultipleActiveResultSets=True;App=BlackBookEPFCore";
it is set to default database so it should work on any machine with SQL server on it. I am using Visual Studio Community 2019 version 16.4.4
If you have difficulty setting this up let me know. I have attached a backup copy of the database.
MJ
Attachment: BlackBookEPFCore_aaa36697.zip
MK
Muthu Kumaran Gnanavinayagam
Syncfusion Team
February 21, 2020 02:05 PM UTC
Hi Mariusz,
Currently we are validating the reported query at our end and will update further details on or before 25th February, 2020. We will highly appreciate your patience until then.
Regars,
G.Muthu kumaran.
VS
Vijayarasan Sivanandham
Syncfusion Team
February 26, 2020 02:01 PM UTC
Hi Mariusz Juszkiewicz,
Thank you for your patience.
Currently we are configuring the attached application from our side and we will update further details on or before 28th February 2020. We sincerely apology for the delay.
Regards,
Vijayarasan S
VS
Vijayarasan Sivanandham
Syncfusion Team
February 28, 2020 01:40 PM UTC
Hi Mariusz Juszkiewicz,
We configured your sample at our end and we have execute the sample and add the data in SfDataGrid. Its works as expected there is not error occurs. Please find the tested video demo from our end in the below link,
Video Link: https://www.syncfusion.com/downloads/support/forum/151646/ze/BlackBookWPF-1323860583
If still you are facing the same issue, can you please share us below things?
We configured your sample at our end and we have execute the sample and add the data in SfDataGrid. Its works as expected there is not error occurs. Please find the tested video demo from our end in the below link,
Video Link: https://www.syncfusion.com/downloads/support/forum/151646/ze/BlackBookWPF-1323860583
If still you are facing the same issue, can you please share us below things?
- Brief replication procedure/video illustration of the reported issue
Please let us know, if you need any further assistance on this.
Regards,
Vijayarasan S
MJ
Mariusz Juszkiewicz
February 28, 2020 08:38 PM UTC
Yes thank you. I should have been more descriptive in my request.
I can add data no problem allthough there is one glich which I will come back.
First, in the pannel above grid there is a button with which I was testing adding a new row of data directly to EF.
When I click on it data is added to the database, however, it does not show up in the data grid.
This is my problem it does not recogize that there new record in the EF and update the grid.
Second. Proposal ID is autonumber, evetually I was planning to hide it from the user view because it is assigned value from the database.
It is not manual entry. If you enter let say 999 for Proposal ID database will overwright it with next sequencial number and not use the 999 number.
Datagrid should notice that change through EF and update ID accordingly.
Hope I have explained my dillema. Thank you. MJ
VS
Vijayarasan Sivanandham
Syncfusion Team
March 2, 2020 05:56 PM UTC
Hi Mariusz Juszkiewicz,
Please find answers for your queries below
|
Queries |
Answers |
|
Data is added to the database but does not show up in the data grid. |
We have analyzed your query that “Data is added to the database but does not show up in the SfDataGrid". Since, in your application, you maintain the SfDataGrid item source as list collection. List collection does not contain the collection changed event. So, it does not show the data in SfDataGrid. Your requirement can be achieved by SQL Dependency Nuget and please refer the following link,
https://dzone.com/articles/introduction-to-mysql-1 |
Proposal ID database will overwright it with next sequencial number |
In manual entry of proposal Id should be validating by the SfDataGrid.RowValidating Event to cancel the editing value in SfDataGrid. Please refer the below user guide document for your reference, UG Link: https://help.syncfusion.com/wpf/datagrid/data-validation#row-validation |
Please let us know, if you need any further assistance on this.
Regards,
Vijayarasan S
MJ
Mariusz Juszkiewicz
March 15, 2020 06:37 PM UTC
do you have an example of working datagrid with Entity Framework CORE?
VS
Vijayarasan Sivanandham
Syncfusion Team
March 16, 2020 01:52 PM UTC
Hi Mariusz Juszkiewicz,
Thanks for the update.
Currently, we are analyzing your requirement of “datagrid with Entity Framework CORE” in SfDataGrid. We will validate and update you the details on March 18, 2020.
We appreciate your patience until then.
Regards,
Vijayarasan S
Thanks for the update.
Currently, we are analyzing your requirement of “datagrid with Entity Framework CORE” in SfDataGrid. We will validate and update you the details on March 18, 2020.
We appreciate your patience until then.
Regards,
Vijayarasan S
SIGN IN To post a reply.
- 9 Replies
- 3 Participants
-
MJ Mariusz Juszkiewicz
- Feb 18, 2020 05:32 AM UTC
- Mar 16, 2020 01:52 PM UTC