• .NET

    GridView in ComboBox with RadControls for Silverlight

    May 18, 2009 Share
    Recently we received several requests for an example, demonstrating how to put a virtualized GridView in a ComboBox popup. The best way to do this in my opinion is to replace the ItemsPresenter of the ComboBox with a GridView. There is some plumbing that has to be done, but I managed to separate it in two attached behaviors. The original idea is described in my blog post for TreeView in ComboBox which I recently updated with the latest control template of RadComboBox for Silverlight. The principle is exactly the same with RadGridView and it should work with very minor adjustments with...
  • .NET Mobile

    Executing JavaScript function from server-side code

    This is a pretty common scenario when working with WebForms. There are many ways to achieve the desired result, but they have one thing in common – you should make sure that the controls are fully loaded in the page before trying to get a reference to them and use them in your JavaScript code. In ASP.NET it is pretty straightforward to do that. For example you could use a label: ASPX <head runat="server">     <title>Untitled Page</title>     <script type="text/javascript">     function calledFn()     {         alert("code fired");      }     </script> </head> <body>     <form id="form1" runat="server">         <asp:Button ID="Button1" runat="server" Text="Run JavaScript Code" OnClick="Button1_Click" />         <asp:Label ID="Label1" runat="server"></asp:Label>    ...
  • .NET Mobile

    Client - side events in JavaScript

    February 27, 2009 Share
    Below is a table of the most common client side events in JavaScript. The Table is divided into three columns – the first lists the name of the event. The second contains a short description of the event, and the third lists all page objects, which support the given event.                                          Event Name                Description  Supported by objects  onabort The onabort event occurs when loading of an image is aborted. image onblur The onblur event occurs when an object loses...
  • .NET

    Passing parameters to a UserControl inside RadWindow for Silverlight

    January 07, 2009 Share
    I just wrote a simple application that demonstrates how to databind a treeview to a dummy data source and edit its items in a UserControl, placed in a RadWindow. You could see my other blog posts for examples with web service binding and upgrade the application to suit your needs. To accomplish the requirements, we need to add a property that will contain the edited data item on the UserControl. When the selection in the TreeView changes, we will update that property with the new selection and then open the RadWindow. The UserControl will create a copy of the data item...
  • .NET Mobile

    How do I pause execution in JavaScript?

    December 19, 2008 Share
    The current article is taken from javascript.faqts Contributors: ha mo, Daniel LaLiberte, Brent Boyer, Martin Honnen, mercury rising,   There is no true wait, sleep, or similar function in either the core JavaScript language or in client side JavaScript. Client side JavaScript however provides     setTimeout('js code here', delayInMilliseconds) which allows you to schedule execution of piece of script and setInterval('js code here', intervalInMilliseconds) which allows you to periodically execute a piece of script. So if you wanted (pseudo code) statement1;  wait (someDelay);  statement2;  you would stuff the code into functions: function statement1 () {      // your code here  }  function statement2 () {      // your code here  }    and call statement1();  setTimeout('statement2()', someDelay);      If you wanted (pseudo...