Hello,
I have a dropdown inside a grid. How can I make it such that when the text is too long, the text won't be cut?
In this example, I want the dropdown to show "Iced Coffee" instead of "Iced C"
|
Index.cshtml
{
ViewData["Title"] = "Home Page";
}
@Html.AntiForgeryToken()
<ejs-grid id="Grid" allowPaging="true" width="800" dataSource="ViewBag.DataSource" toolbar="@(new List<string>() {"Add", "Edit", "Update", "Delete" })">
<e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true" mode="Normal" ></e-grid-editSettings>
<e-grid-columns>
<e-grid-column field="OrderID" headerText="Order ID" isPrimaryKey="true" textAlign="Right" width="100"></e-grid-column>
<e-grid-column field="CustomerID" headerText="Customer ID" type="string" editType="dropdownedit" validationRules="@(new { required= true })" width="120"></e-grid-column>
<e-grid-column field="Freight" headerText="Freight" textAlign="Right" format="C2" editType="numericedit" width="120"></e-grid-column>
<e-grid-column field="ShipCity" headerText="Ship City" editType="dropdownedit" width="80"></e-grid-column>
</e-grid-columns>
</ejs-grid>
<script>
</script>
<style>
.e-dropdownbase .e-list-item {
overflow: visible !important;
}
</style> |
Hi Ajith,
Thanks for the reply.
I've downloaded your sample but the dropdown is still constrained by the width of the column. While I can scroll horizontally, this experience is not ideal.
I thought there was a flag that could control this. But as your solution was CSS, I just set the width of the dropdown container to auto
Thanks for pointing me towards