I am using my kendo grid page with multiple columns.
I want to set the column width for auto-tuning and automatically change the width. Plz help me thanks
@(Html.Kendo().Grid<GardeshKar.Models.v_marhaleh_marahel>()
.Name("grdMarahel_Gardeshkar")
.ToolBar(toolbar => toolbar.Custom().Name("btnAddMarhaleh").Text("اضافه").HtmlAttributes(new { id = "btnAddMarhaleh", href = "#" }))
.Columns(columns =>
{
columns.Bound(c => c.Code).Width(50).Title("کد");
columns.Bound(c => c.Desc).Width(150).Title("شرح");
columns.Command(c => c.Destroy().Text("حذف")).Width(70).Title("عملیات");
})
.HtmlAttributes(new { style = "height: 380px;" })
.Scrollable()
.Sortable()
.Resizable(rl => rl.Columns(true))
.Selectable(sl => sl.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
.DataSource(dataSource => dataSource
.Ajax()
.Model(m => m.Id(p => p.id))
.Read(read => read.Action("Get_DS_Marahel_Gardeshkar", "Home",
new { intGardesh = ViewBag.CodeGardeshKar }))
.Destroy(del => del.Action("Del_Marhaleh_GardeshKar", "Home")))
)
this autofile specific column should change the column width in autofit
source
share