Grid Columns Auto Width, Autofit - Awesome Core And MVC ...
Có thể bạn quan tâm
Grid columns auto width, autofit descriptionviewGrid column width is determined by the cells contents, each time the user goes on a different page the grid columns widths can change (you may need to make your browser window smaller to notice that).GridColumnsAutoWidth/Index.cshtmlsrc@(Html.Awe().Grid("Grid1") .Mod(o => o.Main().Custom("gridColAutoWidth")) .Columns( new Column { Bind = "Id", Width = 75, Groupable = false, Resizable = false }, new Column { Bind = "Person" }, new Column { Bind = "Food.Name", ClientFormatFunc = "site.imgFood", MinWidth = 200 }, new Column { Bind = "Country.Name", Header = "Country" }, new Column { Bind = "Date", Width = 120 }, new Column { Bind = "Location" }, new Column { Bind = "Chef.FirstName,Chef.LastName", Prop = "ChefName", Header = "Chef" }) .Url(Url.Action("GetItems", "LunchGrid")) .Height(350) .Reorderable())<script> function gridColAutoWidth(o) { var g = o.v; // data loaded awe.bind(o, g, 'aweload', function (e) { if (!$(e.target).is(g)) return; var colSizes = {}; var scale = $('<span class="awe-row"></span>'); g.find('.awe-content').append(scale); // calc col sizes g.find('.awe-itc .awe-row').each(function (i, rel) { $(rel).children().each(function (tdi, tdel) { // get content width scale.html($(tdel).html()); colSizes[tdi] = Math.max(colSizes[tdi] || 0, scale.width()); }); }); scale.remove(); // apply col sizes var columns = g.data('o').columns; g.find('colgroup').first().children().each(function (rendi, cel) { var coli = $(cel).data('i'); if (awef.isNotNull(coli)) { columns[coli].Mw = colSizes[rendi] + 50; // plus for padding } }); g.data('api').render(); }); }</script> Comments
Documentation Forum Sitemap Prodinner Demo
Contact Us Terms of Use Privacy policy Cookie policy
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our cookie policy and privacy policy. OKTừ khóa » Html.grid Mvc Column Width
-
How To Increase Cell Width Of MVC Grid? - Stack Overflow
-
ASP.NET MVC Data Grid Component Column Widths - Documentation
-
ASP.NET MVC WebGrid Column Width - Gists · GitHub
-
MVC.Grid Column Styling
-
How To Make The Fixed Width Of Webgrid Column? - MSDN - Microsoft
-
Example Of Column Resize In ASP.NET MVC Data Grid Control
-
Set Column Widths, Wrap Text | ASP.NET MVC (Classic) Forums
-
Resizing Columns - ASP.NET MVC Extensions - Grid View Demo
-
Column Class | ASP.NET MVC Controls | ComponentOne - GrapeCity
-
Columns And Layout (igGrid) - Ignite UI
-
How To Set Gridview Column Width Dynamically In Asp.Net C# ...
-
Mvc How To Change Webgrid Width/Height Size - ADocLib
-
A Simple Way To Implement Grid Using MVC - C# Corner
-
Kendo Mvc Grid Column Width Autofit