We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Working Grid using Asp.net Core 2.0

Thread ID:

Created:

Updated:

Platform:

Replies:

132150 Aug 16,2017 07:14 PM UTC Jul 9,2018 11:05 AM UTC ASP.NET Core 12
loading
Tags: Grid
Edmund Herbert
Asked On August 16, 2017 07:14 PM UTC

Hi Guys

I am having issues using grid in asp.net core 2.0 could you give me an example asp.net core 2.0 Mvc application with a grid (CRUD)

Many

Thanks

Edmund Herbert
Replied On August 18, 2017 01:17 PM UTC

Hi Guys

I am having issues using grid in asp.net core 2.0 could you give me an example asp.net core 2.0 Mvc application with a grid (CRUD)

Many

Thanks

Thank you for contacting Syncfusion Support,   
Yes, our latest (15.2.0.46) version of ASP.NET Core Nuget packages do support in ASP.NET Core version 2.0.  Please, check out the link to know more about EJ components in ASP.NET Core platform. 
Hi this is getting urgent need asp.net Core 2.0 to work with EF asp.net MVC with CRUD functions I tested and controller receives null data from View, I had same issue with 1.1 and found that Json was missing version 2.0 is different

Thanks

Edmund Herbert

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On August 21, 2017 09:35 AM UTC

Hi Edmund, 

Thanks for contacting Syncfusion Support. 

We have checked your query and created sample using CRUD operations in Grid on ASP.NET Core 2.0 but we are unable to reproduce your reported problem “controller receives null data from Viewat our end.  Please refer to the sample which can be downloaded from the below location. 

 
Also we can get the inserted values to the controller side and it doesn’t returns the null value. Please refer to the screenshot attached. 

.  
 

Please ensure that dependencies has been referred in your project like given below. 

 

After following the above solution, still facing any problem, could you please share us the following details given below. 

1. Share Grid code example(both in server and client side). 

2. Screenshot/Video to replicate the issue. 

3. If possible, provide an issue reproducing sample or hosted link or replicate the issue in the provided sample. 

The provided information will help us to analyze and provide you the solution as early as possible. 

Regards, 

Farveen sulthana T 


Edmund Herbert
Replied On August 22, 2017 06:52 AM UTC

Hi Farveen,

Thanks for update I have attached my application which is different to yours I still have issue with view data being returned as null and other issues when you run Brand Controller and view.


Thanks for your help


Attachment: Restaurant_a52b7293.zip

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On August 23, 2017 12:47 PM UTC

Hi Edmund, 

We have checked your sample and in your given sample data Source returns null in view bag because your given db has not present in the server Explorer. Please ensure that your given db has been present in solution explorer and declared in appsettings.json file. We have given the list of data source and bind to the viewbag. It get works.  

Please refer to the code example:- 

public ActionResult Index() 
        { 
            List<dynamic> dynList = new List<dynamic>() { 
               new {BrandId = 1, BrandName = "Elevator", BrandDescription="Vertical Pop" }, 
               new {BrandId = 2, BrandName = "Stairs", BrandDescription="Fitness" } 
            }; 
            ViewBag.branddatasource = dynList; 
            return View(); 
        } 


Please refer to the modified sample:- 


Have you faced this sql exception error or any other issue faced on your given sample. If so please share the screenshot/Video of the issue.  

Regards, 

Farveen sulthana T 


Edmund Herbert
Replied On August 23, 2017 01:17 PM UTC

Hi Farveen,

The example you have sent me does not work please change it to read and write data to a MSSQL express database , that is what I am trying to do your example does not use EF and external sql database


Regards

Edmund Herbert


Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On August 28, 2017 03:59 PM UTC

Hi Edmund,   
   
We have prepared a sample in .Net Core and Entity FrameWork that can be downloaded from the following location.   
  

 Please refer to  the code example:- 

<ej-grid id="FlatGrid" allow-paging="true" >  
    <e-datamanager json="(IEnumerable<object>)ViewBag.datasource" insert-url="/Home/NormalInsert"adaptor="remoteSaveAdaptor" />  
    <e-edit-settings allow-adding="true"/>  
    <e-toolbar-settings show-toolbar="true" toolbar-items="@(new List<string> { "add""update""cancel"})"/>  
    <e-columns>  
        <e-column field="OrderID" header-text="Order ID" text-align="Right" is-primary-key="true"></e-column>  
            . ..   
               . ..   
    </e-columns>  
</ej-grid>  
  
        public ActionResult NormalInsert([FromBody]CRUDModel<Orders> param)  
        {  
            _context.Add(param.Value);  
             _context.SaveChangesAsync();  
            return Json(param.Value);  
        }  
        public IActionResult Index()  
        {  
            ViewBag.datasource = (IEnumerable)_context.Orders.ToList();  
            return View();  
        }  
  
Regards,   
Farveen sulthana T 
 


Edmund Herbert
Replied On September 4, 2017 06:53 AM UTC

Hi Issue with view returning null,

fixed please remember in startup file to add


 services.AddMvc()

                .AddJsonOptions(x =>
                {
                    x.SerializerSettings.ContractResolver = null;
                    x.SerializerSettings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore;
                });
I hope this will help other people having same issue with core 2.0 and grid

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On September 5, 2017 03:59 PM UTC

Hi Edmund, 

Thanks for your valuable update. 

We are glad to know that your reported problem has been resolved. 

Please get back to us if you need any further assistance. 

Regards, 

Farveen sulthana T 


David Pedley
Replied On February 18, 2018 12:35 PM UTC

Hi Edmund.

Many thanks for this - solved an hour's head-scratching problem.

Perhaps Syncfusion could incorporate this into their standard setup instructions for Net Core 2.x and their VS2017 template.

Regards, David

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On February 19, 2018 01:01 PM UTC

Hi David, 

We have created the KB Task as per your suggestion “Grid shows blank value while returning from controller in ASP.NET core” and we will update the document Link once it will get refreshed on Online. 

Please get back to us if you need any further assistance. 

Regards, 

Farveen sulthana T 



Heinrich Eberhardt
Replied On July 7, 2018 12:21 AM UTC

You're awesome. Thank you.

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On July 9, 2018 11:05 AM UTC

Hi Heinrich, 

Thanks for your update. Please get back to us if you need any further assistance. 

Regards, 

Farveen sulthana T 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;