on-internet
← Community

How to set column width to autofit in Kendo Grid MVC

Stack Overflow ·

I use to my page of Kendo grid that have multi columns. I want set a column width to autofit and change width automatically. 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("شرح");//Autofit columns.Command(c => c.Destroy().Text("حذف")).Width(70).Title("عملیات"); }) .HtmlAttributes(new {

Comments

Sign in or sign up to comment and upvote.

No comments yet.