• .NET Web

    How To: Telerik RadGrid for ASP.NET AJAX with ASP.NET MVC

    I've made small example how to use RadGrid for ASP.NET AJAX in Microsoft ASP.NET MVC:   The key here is to inherit from RadGrid and call explicitly desired grid commands. Let's say you want to edit particular record: 1) Create a template column and add this to the ItemTemplate: <%# Html.ActionLink("Edit", "RadGridCommand", new { ControlID = MyGrid1.ID, CommandName = "Edit", CommandArgument = Container.ItemIndexHierarchical }) %>   2) Now handle this in your controller: public ActionResult RadGridCommand(string ControlID, string CommandName, string CommandArgument) {     ViewData["ControlID"] = ControlID;     ViewData["CommandName"]= CommandName;     ViewData["CommandArgument"] = CommandArgument;     return View("Index"); }   3) Override OnPreRender in inherited class and call explicitly the grid...
    September 30, 2008
  • .NET Web

    How To: Animate RadGrid headers using jQuery

    Yesterday I saw this and I really liked the script. The idea is to animate backgroundPosition CSS property for desired HTML element and I have created small example how to do the same for RadGrid column headers: Enjoy! [Download]...
    September 26, 2008
  • .NET Web

    How To: Telerik RadGrid client-side caching with client-side binding to web services using LINQ to SQL

    My new example illustrates how to cache the grid data client-side based on the current grid state. To do this we need to build a state key using current page index, page size, sort expressions and filter expressions: function getCacheKey(tableView) {       return String.format("{0}{1}{2}{3}",            tableView.get_currentPageIndex(), tableView.get_pageSize(),                tableView.get_sortExpressions().toString(), tableView.get_filterExpressions().toDynamicLinq());    }    Every time when we get new data we can store the result in our client-side cache: function updateGrid(result) {        var stateKey = getCacheKey(tableView);        if (!cache[stateKey]) {            cache[stateKey] = result;        }          tableView.set_dataSource(result);        tableView.dataBind();    }   and when the next grid command occur we can call explicitly updateGrid() method if we have already saved result for the current grid...
    September 19, 2008
  • .NET Web

    How To: Telerik RadGrid for ASP.NET AJAX client-side data-binding to WCF

    In continue to my previous posts related to RadGrid for ASP.NET AJAX client-side data-binding, I've created new example how to bind the grid to a WCF service: web.config service registration: <system.serviceModel>     <behaviors>         <serviceBehaviors>             <behavior name="ServiceBehavior">                  <serviceMetadata httpGetEnabled="true"/>                  <serviceDebug includeExceptionDetailInFaults="false"/>...
    September 16, 2008
  • .NET Web

    How To: Telerik RadGrid Master/Detail client-side data-binding using LINQ to SQL and WebService

    I've made two Master/Detail demos using RadGrid for ASP.NET AJAX, LINQ to SQL and WebService client-side data-binding. The first example is a single grid with two hierarchical levels (Customers -> Orders) with enabled paging, sorting & filtering for the entire hierarchy: and the second demo is a classic Master/Detail with two grids: [Download]...
    September 09, 2008