Toolbar icons not reacting properly

Hi,

I've just started developing web apps this week and found your helpful controls. But I'm in trouble setting up what I intend to...
The view's content is

@{Html.EJ().Grid<object>("HierarchyGrid")
                   .Datasource(datasource => datasource.Json((IEnumerable<object>)ViewBag.datasource).UpdateURL("/Home/Update")
                    .InsertURL("/Home/Insert").RemoveURL("/Home/Remove").Adaptor(AdaptorType.RemoteSaveAdaptor))
                   .AllowPaging()
                   .AllowRowDragAndDrop()
                   .EditSettings(edit => { edit.AllowAdding(true).AllowDeleting(true).AllowEditing(true).EditMode(EditMode.Normal); })
                   
                    .ToolbarSettings(toolbar =>
                    {
                        toolbar.ShowToolbar().ToolbarItems(items =>
                        {
                            items.AddTool(ToolBarItems.Add);
                            items.AddTool(ToolBarItems.Edit);
                            items.AddTool(ToolBarItems.Delete);
                            items.AddTool(ToolBarItems.Update);
                            items.AddTool(ToolBarItems.Cancel);
                        });
                    })
                   .Columns(col =>
                   {
                       col.Field("Article").HeaderText("Article").IsPrimaryKey(true).EditType(EditingType.StringEdit).Add();
                       col.Field("Price").HeaderText("Price").EditType(EditingType.StringEdit).Add();
                   }).Render();}


The Grid is filled with data correctly, but when I click on the "Add" symbol of the Toolbar, nothing happens. When I click on Edit or Delete without selected any item, a dialog is shown as usual. But when an item is selected, nothing happens too, just like double clicking.
My achievement is to change cell values, make them persistent in the database. Therefore I got the following methods inside my controller.

public ActionResult Update(Order value)         {             _context.Update(value);             var data = _context.Orders;             return Json(data);         }         public ActionResult Insert(Order value)         {             _context.Add(value);             var data = _context.Orders;             return Json(data);         }         public ActionResult Remove(int key)         {             _context.Remove(null);             var data = _context.Orders;             return Json(data);         }

Could you please help me? When I remember correct, the exact same structure worked in another project I saw the past day.
Please tell me if you need additional information. I've setup the environment (bower, nuget, etc) as stated in the installation guide.

I appreciate help, thanks in advance.

8 Replies

MP Manivannan Padmanaban Syncfusion Team March 7, 2018 01:12 PM UTC

Hi Dave, 

Thanks for contacting syncfusion support. 

We are analyzed your query and we are able to understand that, you are  facing the issue with crud action while using the remotesave adaptor. We are unable to reproduce the reported issue at our end. For your convenience we have created the sample please refer to the below link, 


After referring the sample, still facing the issue please provide the following details that help us to resolve the issue as soon as possible, 

  1. Confirm whether the crud action url are defined correctly?
  2. Share the error are you facing.
  3. Provide the issue reproducing sample or reproduce the issue in the provided sample.

Regards, 

Manivannan Padmanaban. 




MP Manivannan Padmanaban Syncfusion Team March 8, 2018 04:16 AM UTC

Hi Dave, 
  
We also would like to let you know about our next generation JavaScript product - Essential JS 2, in case if you are not aware of it. Essential JS 2 is fully re-written to be modular, responsive and lightweight. 
  
We suggest you look into our following product page for more details. 
  
Demo page for ej2 Grid 
  
Regards, 
Manivannan Padmanaban. 



DT Dave Tchizo March 8, 2018 06:55 PM UTC

I got it working on. Thanks for your reply and thanks for the offer.

Is there a way I can see which Version of Syncfusion is currently running?
Anyway, before I hop into JS 2, I'd like to feel comfortable with the Syncfusion API and see what I can get out of it.






FS Farveen Sulthana Thameeztheen Basha Syncfusion Team March 9, 2018 12:35 PM UTC

Hi Dave, 

Query #1 :- Version of Syncfusion is currently running 

Please refer to the documentation Link for checking versions 
 
  
Query # 2:- Syncfusion API and see what I can get out of it. 

Please refer to the documentation and API link for JS2 

 
 
Regards, 
 
Farveen sulthana T 





DT Dave Tchizo March 9, 2018 08:19 PM UTC

Hi,

Query #1
That's not what I meant. Actually I meant the version which is embedded within the IDE I am using.




FS Farveen Sulthana Thameeztheen Basha Syncfusion Team March 12, 2018 02:19 PM UTC


Hi Dave, 

You can check the version by using following steps:- 

1. Goto Project -> Manager nuget package 
 
    

2. In that you can find the version 

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

Regards, 

Farveen sulthana T 



DT Dave Tchizo March 13, 2018 10:45 AM UTC

I'm using EJ1 as it seems. However, I decided to search for another framework...Syncfusion may have a lot of controls, but I'm keep on running from one problem to the other (for example, when using UrlAdapter, the data isnt shown in the grid, but the rows are created but remain empty. When switching to RemoteSaveAdapter, it's ok, but the CRUD Operations do not synchronize with the view, so I have to double write code, one for server side and one for client side. And handle errors and, and, and.)

All the documentation and the forum threads didn't help me in any way. The HTTP Requests and Responses look all fine. I think the communication pipiline between controller and view messes it up. I don't want to create a new forum thread for each problem...I dont have the time for that. 

Thanks for your help, but Im out.


VN Vignesh Natarajan Syncfusion Team March 14, 2018 01:45 PM UTC

Hi Dave, 
 
We deeply regret for the inconvenience caused.  
 
Query: “When switching to RemoteSaveAdapter, it's ok, but the CRUD Operations do not synchronize with the view, so I have to double write code” 
 
We suspect that reported issue may occur when suggested Url path varies.   
  .Datasource(datasource => datasource.Json((IEnumerable<object>)ViewBag.datasource).UpdateURL("/Home/Update") 
                    .InsertURL("/Home/Insert").RemoveURL("/Home/Remove").Adaptor(AdaptorType.RemoteSaveAdaptor)) 
 
 
Or in server side you have defined Order class.  
 
 public ActionResult Insert(Order value)
 
 
Issue may occur when Order class does not contain the definition for mentioned columns (Article ,Price).  
 
So kindly ensure the below mentioned suggestion before running the sample again. 
 
1.       Whether the Url path given for insert/Update is a correct Url? 
2.       Order Class has definition for columns Article and Price. 
3.       If the issue still occur. Try to reproduce the reported issue in provided sample. 
 
Sample can be downloaded from below link 
 
 
Kindly refer our help documentation for your reference 
 
 
 
Regards, 
Vignesh Natarajan 


Loader.
Up arrow icon