I have been trying to get filtering, sorting, and searching working on Grids with complex databinding (having the dot operator). I have found several questions that have similar questions such as:
In these quests and others that have been asked
the answer is usually:
services.AddControllersWithViews().AddNewtonsoftJson(options =>
{
options.SerializerSettings.ContractResolver = new DefaultContractResolver();
options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
});
Which I have and does not fix my problem.
When I try and search and filter I get:
"Object
reference not set to an instance of an object."
When I try and sort I get:
The LINQ expression 'DbSet
.Include(m => m.MessageType)
.Include(m => m.Incident)
.Include(m => m.Person)
.Include(m => m.OffenseCode)
.Select((a, i) => new {
a = a,
TempData = __ToList_0.get_Item(i)
})' could not be translated.
This is similar to the first question. All test projects listed are never attached to any external resources. I believe the problem is how Entityframework Core and syncfusion are interacting.
Attached is a bare bones project I made that has a grid data with complex data binding. The project will create a database and seed it will test data (DataContext and Seed). However, it attempts to do this on SQL Server Express, so the computer that it is run on will need SQL Server Express.
Attachment: SyncfusionComplexBinding_c02cbfd0.zip
It looks like it can't connect to the SQL server express. Was SQL server express on the machine and did it create the database?
Did you get an exception in program.cs? There would normally be a logger here, but I wanted to keep the project as small as possible.
If so, there should be a database on the SQL server express with this database and tables.
Thanks, I look forward to seeing the changes.
The update fixed the problem for us. Thanks.