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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid - Documentation is Incomplete

Thread ID:

Created:

Updated:

Platform:

Replies:

136307 Mar 8,2018 04:14 PM UTC Mar 12,2018 10:02 AM UTC ASP.NET Core - EJ 2 1
loading
Tags: DataGrid
Rob Swafford
Asked On March 8, 2018 04:14 PM UTC

Hi, trying to get a grid set up with editing, and I'm unable to find complete references for the editType property and the edit params as well (referenced here:https://ej2.syncfusion.com/16.1.24/aspnet/documentation/grid/edit.html?syntax=tag#cell-edit-type-and-its-params)

"params" is a reserved word in c#, so your example code is wrong -- it doesn't compile as stated.

What other edit types are available? Is there a datepicker option? Can you get the params bit corrected and fully documented so we know what options are available, especially for the drop down editor? How do I get the drop down to bind to a list of data in my View Model for example?

Venkatesh Ayothi Raman [Syncfusion]
Replied On March 12, 2018 10:02 AM UTC

Hi Rob, 

Thanks for using Syncfusion products. 
Query #1:” params" is a reserved word in c#, so your example code is wrong -- it doesn't compile as stated 
We have considered this “Cell edit type and params documentation code example is incorrect” as Documentation task and it will be updated on live in upcoming releases. 
Query #2:” What other edit types are available? 
We have following editTypes in Grid, 
1)      NumericEdit 
2)      DropdownEdit 
3)      DatepickerEdit 
4)      BooleanEdit 
Note: We will update the Grid Cell edit types in that documentation.  
Query #3:”Datepicker editType” 
Yes, we have EditType for date columns as named datapickeredit. Please refer to the following code example, 
<ejs-grid id="Grid" dataSource="ViewBag.DataSource" height="315" allowPaging="true"> 
    <e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true"></e-grid-editSettings> 
    <e-grid-columns> 
        . .  . 
        <e-grid-column field="OrderDate" headerText="Order Date" width="150" type="date" editType="datepickeredit" format="yMd"></e-grid-column> 
    </e-grid-columns> 
</ejs-grid> 
 
Query #4:” Can you get the params bit corrected and fully documented so we know what options are available, especially for the drop down editor? 
We have built-in support for dropdown edit type in Grid. Please refer to the following code example, 
@{ 
 
    var editParams = new { @params = new { value = "Germany" } }; 
    
  } 
<ejs-grid id="Grid" dataSource="ViewBag.DataSource" height="315" allowPaging="true"> 
    <e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true"></e-grid-editSettings> 
    <e-grid-columns> 
. .  . 
        <e-grid-column field="ShipCountry" headerText="Ship Country" editType="dropdownedit" edit="editParams" width="150"></e-grid-column> 
         
    </e-grid-columns> 
</ejs-grid> 
 
Query #5:” How do I get the drop down to bind to a list of data in my View Model for example? 
 
As from your query, we suspect that do you want to bound the custom data source for Dropdown list while editing the Grid. If so, we have achieved your requirement using same edit params feature. Please refer to the following code example, 
@{ 
 
    var editParams = new { @params = new { dataSource = ViewBag.dropdown, fields = new {  value = "ShipCountry" } } };  
 
} 
 
<ejs-grid id="Grid" dataSource="ViewBag.DataSource" height="315" allowPaging="true"> 
    <e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true"></e-grid-editSettings> 
    <e-grid-columns> 
. .  . 
        <e-grid-column field="ShipCountry" headerText="Ship Country" editType="dropdownedit" edit="editParams" width="150"></e-grid-column> 
              .  .  .         
    </e-grid-columns> 
</ejs-grid> 
 
[Controller] 
  public IActionResult Index() 
        { 
            .  .  . 
            List<object> dd = new List<object>(); 
            dd.Add(new { ShipCountry = "Denmark" }); 
            dd.Add(new { ShipCountry = "Brazil"  }); 
            dd.Add(new { ShipCountry = "Germany"  }); 
            dd.Add(new { ShipCountry = "Austria" }); 
            dd.Add(new { ShipCountry = "Switzerland" }); 
            ViewBag.dropdown = dd; 
            return View(); 
        } 
 
Note: We will update the Grid Cell edit types in that documentation. Until please refer to the above code example. 
We have also prepared a sample for your convenience which can be download from following link, 

In that sample, we have enabled the EditType as follows Dropdownedit and Datepicker. 

Regards, 
Venkatesh Ayothiraman. 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon