Telerik blogs

Latest

  • Web

    Silverlight 2.0 Custom Scroll Viewer with Mouse Wheel

    In this blog post i will demonstrate how to customize Scroll Viewer and enable the mouse wheel functionality. I would be using the mix08 controls for  silverlight 2.0. they are  free and with open license. Before start please download Mix08 Controls. 1. Extract them and then open MixControls, after that see generic.xaml file, and open it. Find and copy the ScrollViewer style, it should be something like: .cf { font-family: Courier New; font-size: 10pt; color: black; background: white; } .cl { margin: 0px; } .cln { color: #2b91af; } .cb1 { color: #a31515; } .cb2 { color: blue; } .cb3 { color: red; } .cb4 { color: green; }    <Style x:Key="ScrollBarStyle" TargetType="ScrollBar">           <!-- Any other properties you want to set -->           <Setter Property="Template"> 2. Open your Silverlight project in VS 2008, and go to App.xaml and paste in the <Application.Resources> the style for the scroll viewer....
  • Web ASP.NET AJAX

    The dark side of static members

    Often we find it easy to create a class with a static event to keep the controls in our web application loosely coupled. The easiest way to make a number of controls interact without “knowing” about each other is to have a static event distributor class. public class EventDistributor {     public static event EventHandler SomethingHappened;     public static void RaiseSomethingHappened(object sender, EventArgs e)     {         if (SomethingHappened != null)         {             SomethingHappened(sender, e);         }     } } Some of the controls raise the events of the distributor… protected void Button1_Click(object sender, EventArgs e) { …     EventDistributor.RaiseSomethingHappened(sender, e); … } …and others subscribe to them protected void Page_Load(object sender, EventArgs e) {   ...
    April 18, 2008
  • Web ASP.NET AJAX

    Items drag and drop for RadGrid

    In the eve of the official release of RadControls for ASP.NET AJAX suite (formerly known as Prometheus) I have decided to present you with a new feature of the RadGrid control. Besides of .Net 3.5 data binding optimizations, calculated columns and more other new enhancements, in the latest version of the control you can now find built-in support for items drag and drop. Through both the client and server -side events you can precisely handle dragging and dropping to same or other RadGrid instances as to other html elements.
    April 16, 2008
  • Web ASP.NET AJAX

    RadControls and ASP.NET Dynamic Data - Part Deux

    UPDATE: You can download the latest Dynamic Data bits from here. It seems that I've managed to mess things up in my previous blog post. The sample web site and user controls work but ... they are using the December CTP release of ASP.NET Dynamic Data! Kudos to Scott Hunter for spotting the problem. It seems that albeit I installed the latest Dynamic Data bits I forgot to uninstall the December CTP and Visual Studio 2008 was still using the old Web Site template. Be careful when installing the new bits - uninstall any previous releases first! The sample web site and...
    April 16, 2008
  • Web ASP.NET AJAX

    RadControls and ASP.NET Dynamic Data

    UPDATE: You can download the latest Dynamic Data bits from here. ASP.NET Dynamic Data I am thrilled to announce that there is a new drop available for the ASP.NET Dynamic Data. You don’t know what the heck that is? It is the upcoming technology from the ASP.NET team which is designed to help you build web sites faster. Go check the following links immediately: http://weblogs.asp.net/scottgu/archive/2008/04/10/asp-net-dynamic-data-preview-available.aspx http://sessions.visitmix.com/?selectedSearch=T24 http://blogs.msdn.com/davidebb/archive/2008/03/06/dynamic-data-at-mix-and-upcoming-changes.aspx http://davidebbo.members.winisp.net/screencasts/dbimage.wmv http://www.hanselman.com/blog/PuttingASPNETDynamicDataIntoContext.aspx Points of extensibility One of the key features of ASP.NET Dynamic Data are the DynamicField and his buddy the FieldTemplateUserControl.  DynamicFields represent the field of your objects. The FieldTemplateUserControl displays and edits the corresponding DynamicField – integer, decimal, date time...
    April 14, 2008