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. Image for the cookie policy date
close icon

Multiple dropdownlist in grid with inline editing

Hello,

I'm continue my proof of concept with you Framework :)
I have an inline edit page based on the grid, and i would integrate a multiple dropdownlist as column in the grid with inline editing.

My models :
Currency (Id, Name, IsoCode) < 0-n >Export (Id, Name)
A "Currency" can be exported on 0 or many "Export".
The grid is for CRUD the Currency model, and the content of the dropdownlist would be based on the Export model.

After searching a moment, i have found sample, but with de EJ version only, and i use the EJ 2.
Thank you for help.

Best regards,

3 Replies

PS Pavithra Subramaniyam Syncfusion Team September 6, 2019 12:11 PM UTC

Hi Yann, 
 
Greetings from Syncfusion. 
 
Query: Multiple dropdownlist in grid with inline editing 
 
We have validated your query and we are quite unclear about your requirement. Could you please check the below documentation links and check whether the below topics satisfy your requirement or not. 
 
                                             https://ej2.syncfusion.com/aspnetcore/documentation/grid/columns/#foreign-key-column 

If the above links does not meet your requirement, then could you please share the below details. It will be help to provide a better solution. 

  • Do you want to render multi select dropdown list in grid column?
  • Share the link for EJ1 sample if possible.
  • Share more details about your requirement.
 
Regards, 
Pavithra S 



YJ Yann Jobin September 9, 2019 11:03 AM UTC

Hi,

For answer to you questions :
  • Do you want to render multi select dropdown list in grid column? Yes ! But with the content of the dropdownlist must be data from another table with Relationship !
  • Share the link for EJ1 sample if possible. This the link : https://www.syncfusion.com/forums/141189/multi-select-dropdownlist-in-grid
  • Share more details about your requirement. Render multi select dropdown in grid column, with the ASP.NET Core EJ2 Framework.
The 2 link you have writing are good for start, but i don't understand how implementing the multi select dropdown in the grid.

Thank you for support.
Best regards


PS Pavithra Subramaniyam Syncfusion Team September 10, 2019 07:16 AM UTC

Hi Yann, 
 
Thanks for your update. 
 
Based on your requirement we have created a sample in which, we have rendered multiselect dropdown in CustomerID column(while editing) by using cell edit template  support. Please find the below code example and sample for your reference. 
 
[code example] 
<ejs-grid id="Grid" dataSource="@ViewBag.data" allowPaging="true" toolbar="@( new List<object>() {"Add","Edit","Delete","Update","Cancel"})"> 
    ... 
   <e-grid-columns> 
        <e-grid-column field="OrderID" headerText="Order ID" isPrimaryKey="true" textAlign="Right" width="120"></e-grid-column> 
        <e-grid-column field="CustomerID" headerText="Customer ID" textAlign="Right" width="120" edit="@(new {create = "onCreate", read = "onRead", write = "onWrite", destroy= "onDestroy"})"></e-grid-column> 
        ... 
    </e-grid-columns> 
</ejs-grid> 
 
<script> 
 
    var multiSelectEle; 
    var element 
    function onCreate(args) { 
        element = document.createElement('input'); 
        return element; 
    } 
    function onRead(e) { 
        return multiSelectEle.value; 
    } 
    function onDestroy() { 
        multiSelectEle.destroy(); 
    } 
    function onWrite(args) { 
        multiSelectEle = new ej.dropdowns.MultiSelect({    //rendering multiSelectEle component 
            dataSource: @Html.Raw(Json.Serialize(@ViewBag.dropData)), 
            fields: { value: "CustomerID", text:"CustomerID"} 
        }); 
        multiSelectEle.appendTo(element); 
    } 
 
</script> 
 
 
 
Please get back to us if you need further assistance. 
 
Regards, 
Pavithra S. 


Loader.
Live Chat Icon For mobile
Up arrow icon