• .NET Web

    How To: Easy print and print preview with RadGridView for WPF

    December 28, 2009 Share
    Using FixedDocument, DocumentViewer and PrintDialog you can easily create your own print and/or print preview for RadGridView for WPF. I’ve made two extension methods Print() and PrintPreview() to illustrate how to turn the grid into a print friendly document in few lines of code: … public static void PrintPreview(this GridViewDataControl source) { var window = new Window() { Title = "Print Preview", Content = new DocumentViewer() ...

  • .NET Web

    How To: Custom scrolling with RadGridView for Silverlight and WCF RIA Services

    December 21, 2009 Share
    I’m pleased to announce that with our upcoming service pack (Q3 SP2 – middle of January 2010) you will be able to plug your own scrolling logic for RadGridView for Silverlight. I’ve made small demo on how to page DomainDataSource using the grid vertical scrollbar with minimal coding effort:   … <riaControls:DomainDataSource x:Name="DomainDataSource1" QueryName="GetOrder_Details"> <riaControls:DomainDataSource.DomainContext> <web:NorthwindDomainContext /> </riaControls:DomainDataSource.DomainContext></riaControls:DomainDataSource><telerikGridView:RadGridView telerik:Theming.Theme="Summer" scrolling:CustomScrolling.DomainDataSource="{Binding ElementName=DomainDataSource1}" ItemsSource="{Binding Data, ElementName=DomainDataSource1}" IsBusy="{Binding IsLoadingData, ElementName=DomainDataSource1}"...

  • .NET Web

    New Feature: Silverlight RIA services compression with Telerik RadControls Q3 2009

    With our upcoming Q3 2009 release you can use RadCompression (part of Telerik.Web.UI.dll) to compress your RIA services: Without compression: With compression: Check the numbers :) Enjoy! [Download]...

  • .NET Web

    How To: Silverlight grid hierarchy load on demand using MVVM and RIA services

    I’ve made small example on how to load on demand RadGridView hierarchy child data using MVVM and RIA service:     Using partial classes you can extend very easily generated code with desired load on demand logic: public partial class Customer { bool ordersLoaded = false; public IEnumerable<Order> CustomerOrders { get { ...

  • .NET Web

    How To: Easy printing with Telerik RadGridView for Silverlight

    Using export to HTML feature you can print the grid very easily just by adding following JavaScript to the export output: <script type=""text/javascript"">print();</script> You can use WebClient to save the output as file on the server: Silverlight client side: Uri uri = new Uri(HtmlPage.Document.DocumentUri, String.Format("PrintHandler.aspx?FileName={0}", fileName)); WebClient client = new WebClient(); client.UploadStringCompleted += new UploadStringCompletedEventHandler(client_UploadStringCompleted); client.UploadStringAsync(uri, String.Format("{0}{1}", RadGridView1.ToHtml(), printScript)); ASP.NET server side: protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["FileName"] != null) { File.WriteAllText(Server.MapPath(Request.QueryString["FileName"]), new StreamReader(Request.InputStream).ReadToEnd(), Encoding.UTF8); } } and request this file when upload...