Thoughts from Dan Miser RSS 2.0
# Saturday, November 07, 2009
Telerik just released an extremely impressive library of components (Grid, Menu, TabStrip, and MenuBar), written for MVC. They are truly first-class, from the architecture, to the development experience, to the finished screens that your user sees. They released them as open-source, and even better, these controls are written from the ground up to support ASP.NET MVC.

Be sure to check out this awesome write up on how to Use the grid in a CRUD scenario. Very nicely done.

I'm not a fan of the whole "Edit/Delete" action column. I'd much rather just have a link on the column to take me to the detail screen. Here's the way I solved that:


    <% Html.Telerik().Grid(Model)
        .Name("Grid")
        .PrefixUrlParameters(false)
        .Columns(columns =>
        {
            columns.Add(o => o.CollectionDate).Template(c => { %>
                <%= Html.ActionLink(c.CollectionDate.ToShortDateString(), "View", new { Id = c.Id })%> <%
            }).Width(40);
            columns.Add(o => o.Location.Name).Width(40);
        })
        .Scrollable()
        .Sortable()
        .Pageable()
        .Filterable()
        .Render();
    %>
Saturday, November 07, 2009 9:00:21 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
.NET | ALT.NET | ASP.NET MVC
Navigation
Archive
<February 2012>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2012
Dan Miser
Sign In
Statistics
Total Posts: 375
This Year: 3
This Month: 0
This Week: 0
Comments: 654
Themes
Pick a theme:
All Content © 2012, Dan Miser
DasBlog theme 'Business' created by Christoph De Baene (delarou)