Telerik blogs
  • Desktop WinForms

    Emulating Paging with RadGridView for WinForms and LINQ with 1 million records

    Our customers who use the Telerik ASP.NET line of controls are used to having paging in their grids. This approach, however, is seldom used for WinForms applications, although there are cases when paging in WinForms grids is needed as well, especially when there are million records in the database (literally). You may have seen the blog post by Vladimir Enchev about implementing paging with RadGridView for WPF (if you have not, this is the right time to do so :)). A couple of days ago Mr. Enchev came by and said "You know guys, you could do the same thing with your WinForms...
    September 02, 2008
  • Desktop WPF

    Shaders in WPF? Do you find them useful?

    One of the most exciting things about the new .NET3.5 SP1 is definitely the ability to use Shaders (Pixel Shaders only). As a beginner in that area, I am actively searching for information in blog posts, DirectX documentation, etc. Interestingly enough, a lot of people are keen on the idea of using those, but demos and even hints on possible applications are hard to find. There are a couple of "default" examples, a ShaderPad I find pretty useful, but that's it, no advanced examples what-so-ever. Additionally, I found a couple of cool examples (like those posted on Addam Kinney's blog), but those...
    September 02, 2008
  • Release

    Send Telerik Report as email attachment

    The Report Viewers (Win and Web) do not support sending of reports via e-mail out-of-the-box. To mail a report you have to first render the report programmatically into a convenient format and then attach it to a mail message. Here is a possible way of how to achieve this by using the SmtpClient object: void MailReport(Telerik.Reporting.Report report, string from, string to, string subject, string body){string mimeType; string extension; Encoding encoding; byte[] reportBytes = ReportProcessor.Render("PDF", report, null, out mimeType, out extension, out encoding); MemoryStream ms = new MemoryStream(reportBytes); ms.Position = 0; Attachment attachment = new Attachment(ms, report.Name + "." + extension); MailMessage msg = new MailMessage(from, to, subject, body); msg.Attachments.Add(attachment); SmtpClient client = new SmtpClient(smptHost); ...
    September 02, 2008
  • Productivity

    Show me your IsNumeric() and I'll show you mine

    I was innocently writing a piece of code today and the need arose to check if an input type is a number. Naturally I started looking for such a method inside the .NET classes. After all for a framework which has more than 380,000 methods it will only be logical to have at least one which will do something as basic as this. Guess what? .NET does not ship with such a public method. Whaaaa? But do stay with me, please! It gets better. Armed with Reflector I decided that even if there is no such public method there must be a private one at...
    September 01, 2008
  • Productivity

    Visual Studio 2008 Intellisense and Telerik.Charting

    By default the RadControls installer adds the Telerik.Charting assembly to the GAC on the machine where the package is installed, as the Telerik.Charting assembly is used by more than one package - RadControls for ASP.NET AJAX and RadControls for Winforms. So, let's consider an example -- create a new web site and use at least one control from the suite. When you drag a control from the toolbox Visual Studio will automatically copy Telerik.Web.UI.dll to site's Bin folder. Telerik.Web.UI assembly refers to Telerik.Charting assembly. But as long as Telerik.Charting is in the GAC it will not be copied to the...
    August 29, 2008
  • Desktop WinForms

    Emulating Paging with RadGridView for WinForms and LINQ with 1 million records

    Our customers who use the Telerik ASP.NET line of controls are used to having paging in their grids. This approach, however, is seldom used for WinForms applications, although there are cases when paging in WinForms grids is needed as well, especially when there are million records in the database (literally). You may have seen the blog post by Vladimir Enchev about implementing paging with RadGridView for WPF (if you have not, this is the right time to do so :)). A couple of days ago Mr. Enchev came by and said "You know guys, you could do the same thing with your WinForms...
    September 02, 2008
  • Desktop WPF

    Shaders in WPF? Do you find them useful?

    One of the most exciting things about the new .NET3.5 SP1 is definitely the ability to use Shaders (Pixel Shaders only). As a beginner in that area, I am actively searching for information in blog posts, DirectX documentation, etc. Interestingly enough, a lot of people are keen on the idea of using those, but demos and even hints on possible applications are hard to find. There are a couple of "default" examples, a ShaderPad I find pretty useful, but that's it, no advanced examples what-so-ever. Additionally, I found a couple of cool examples (like those posted on Addam Kinney's blog), but those...
    September 02, 2008
  • Release

    Send Telerik Report as email attachment

    The Report Viewers (Win and Web) do not support sending of reports via e-mail out-of-the-box. To mail a report you have to first render the report programmatically into a convenient format and then attach it to a mail message. Here is a possible way of how to achieve this by using the SmtpClient object: void MailReport(Telerik.Reporting.Report report, string from, string to, string subject, string body){string mimeType; string extension; Encoding encoding; byte[] reportBytes = ReportProcessor.Render("PDF", report, null, out mimeType, out extension, out encoding); MemoryStream ms = new MemoryStream(reportBytes); ms.Position = 0; Attachment attachment = new Attachment(ms, report.Name + "." + extension); MailMessage msg = new MailMessage(from, to, subject, body); msg.Attachments.Add(attachment); SmtpClient client = new SmtpClient(smptHost); ...
    September 02, 2008
  • Productivity

    Show me your IsNumeric() and I'll show you mine

    I was innocently writing a piece of code today and the need arose to check if an input type is a number. Naturally I started looking for such a method inside the .NET classes. After all for a framework which has more than 380,000 methods it will only be logical to have at least one which will do something as basic as this. Guess what? .NET does not ship with such a public method. Whaaaa? But do stay with me, please! It gets better. Armed with Reflector I decided that even if there is no such public method there must be a private one at...
    September 01, 2008
  • Productivity

    Visual Studio 2008 Intellisense and Telerik.Charting

    By default the RadControls installer adds the Telerik.Charting assembly to the GAC on the machine where the package is installed, as the Telerik.Charting assembly is used by more than one package - RadControls for ASP.NET AJAX and RadControls for Winforms. So, let's consider an example -- create a new web site and use at least one control from the suite. When you drag a control from the toolbox Visual Studio will automatically copy Telerik.Web.UI.dll to site's Bin folder. Telerik.Web.UI assembly refers to Telerik.Charting assembly. But as long as Telerik.Charting is in the GAC it will not be copied to the...
    August 29, 2008