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

Dropdown column

How can I set the dropdown width of the column in the inline editing?
So, the width of the foreign key column with dropdown is set to 200px, but I want it to be more than that when I click the dropdown.



Thanks!
Bernard.

3 Replies

HJ Hariharan J V Syncfusion Team July 29, 2019 09:59 AM UTC

Hi Bernard, 

Thanks for contacting Syncfusion support. 

You can customize the DropDownList edit component by using the “edit.params” property of Grid columns. Please refer to the below code example and documentation for more information. 

In the below sample code we have customized the popup width inside the “BeforeOpen” event. 

[index.cshtml] 
@{ 
    var DropDownList = new Syncfusion.EJ2.DropDowns.DropDownList() { BeforeOpen = "beforeOpen" }; 
} 
 
<ejs-grid id="grid" height="100%" width="100%" dataSource=ViewBag.data> 
<e-grid-editSettings allowEditing="true"></e-grid-editSettings> 
       <e-grid-columns> 
         .  .  . 
        <e-grid-column field="ShipCountry" headerText="Ship Country" width="150" editType="dropdownedit" edit="new {@params = DropDownList }"></e-grid-column> 
 
    </e-grid-columns> 
</ejs-grid> 
 
<script> 
    function beforeOpen(e) { 
        this.popupWidth = "300px"; 
    } 
</script> 


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

Regards, 
Hariharan 



BJ Bernard Jurlina July 29, 2019 04:36 PM UTC

Excellent!

It's working fine.

Thanks Hariharan!
Regards,

Bernard.


HJ Hariharan J V Syncfusion Team July 30, 2019 05:46 AM UTC

Hi Bernard,

Thanks for your update.

We are happy to hear that your requirement has been achieved.

Regards,
Hariharan

Loader.
Live Chat Icon For mobile
Up arrow icon