.NET Tips and Tricks

Blog archive

Digging into Telerik RadControls for ASP.NET AJAX

Yesterday I wrote in this blog that I was considering upgrading from the Telerik trial version to the official non-trial version. But with my tight deadline (and the size of the suite) I decided not to risk shooting myself in the foot and to continue my testing with the trial version. If all goes well, I'll have a chance to re-test after doing an upgrade and see if anything goes horribly wrong -- which actually seems like a pretty good thing to find out about the product. You can read the initial VS Toolbox review of Telerik RadControls for ASP.NET AJAX here.

After starting Visual Studio, I decided to skip the Telerik menu and use the standard File | New WebSite menu choice. I found a new project type -- Telerik (I also found a new Telerik project type under File | New Project). Picking it brought up the wizard I mentioned in the previous blog and created a new Web site with a default.aspx page in C#. If you read my Practical ASP.NET column you know that I still do a lot of Visual Basic work. (Readers of my code generation book, which is C# and nothing but C#, may be surprised.) My consulting clients are probably still split 60/40 between Visual Basic and C#, so I tend to have more Visual Basic code lying around than C# code. I was initially disconcerted but then I realized that, since this is ASP.NET, I can add pages in any language I want. I added a page using Visual Basic to see what would happen. Everything worked fine. I then deleted the C# page.

Now I want to add some controls to the page. Another surprise: No Telerik tab on the Toolbox or any new controls in any of the other tabs. Also nothing if I right-mouse click in the editor window and nothing if I right-mouse click on the page in Solution Explorer.

Ah! But if I right-mouse click on the project in Solution Explorer I get a "RadControls for ASP.NET AJAX menu" with a choice called "Add RadControls Scenario" (this menu is also available from the Telerik menu on Visual Studio's main menu bar after you create your first project). I selected a scenario to add a DateTimePicker. This choice, it turns out starts a Wizard that lets me select a control (on the first page), change some settings that apply to all controls (on the second page), and change some control-specific settings (on the third page) -- see figures 1, 2, and 3.

[Click on image for larger view.]
Figure 1. Add control scenario. This wizard let me generate a page with a specific Telerik control on it.

[Click on image for larger view.]
Figure 2. Selecting common properties. The second page of the wizard lets you select the language of the page being generated, whether you want to tie into Microsoft's CDN or register with jQuery, and whether to turn on RadAjax -- whatever that is.

[Click on image for larger view.]
Figure 3. Setting control-specific properties. The third page of the wizard (not present for all controls) lets you select initial values for a control. In this case, I could select how many instances of the control that I wanted on the page.

What I ended up with, however, was a whole new form with the DateTimePicker on it. This includes a RadScriptManager in addition to the control I picked. It seemed unlikely that this was how I was supposed to use the controls.

You know, I might actually have to read the documentation.

One note: The Telerik menu has an "Upgrade Wizard" choice listed so the concerns that I raised in an early blog about upgrading a Web site already using an older version of the Telerik controls may have been unfounded. I'll try an upgrade at the end of my testing. Tune in later.

I also poked around in the New Project templates and found templates in both the Visual Basic and C# areas. It's just the choice under the Telerik project type that only does C#.

Getting to Know Telerik's RadControls for ASP.NET AJAX

Telerik provides two sources for technical information. On-line there are some focused Web pages providing support for individual controls in the suite (these pages are also accessible from the SmartTags on each control). Also available is an 800 page PDF document/training package, which the Telerik site pointed me to with the link "Enjoy over 800 pages of dense training material...".

As a dinosaur and a part-time technical writer, I probably enjoy looking at other people's written work more than most people. But I think "enjoy" is asking a lot of the document's readers. And I don't think people take "dense training material" as a positive thing. Perhaps Telerik is being ironic.

Regardless of how Telerik expects me to feel about the document, it was exactly what I was looking for: a single volume, comprehensive discussion of the suite's controls. It didn't discuss the installing the package, but seemed to assume that the controls would be available on the toolbox. So, I used the 'Choose item' option on the Toolbox and added the Telerik controls. You shouldn't draw too many conclusions from me not finding the controls on the Toolbox initially: I probably fumbled something in the install.

As usual with these suites there are a ton of controls (see figure 4), even assuming that some of these are parts of larger controls and shouldn't be added to a page by themselves. There are some powerful controls in here: a scheduler, a spellchecker, and a grid. Given Telerik's history with creating ASP.NET controls I'm willing, at least for now, to assume that they work as server-side controls. I want to play with their client-side abilities.

[Click on image for larger view.]
Figure 4. Telerik's ASP.NET AJAX controls. The list of controls is long and includes some controls often sold individually.

I dragged some controls onto a form and pressed F5 -- everything seemed to work. Tomorrow I can start actually doing something with the controls.

What's your opinion: What do you want in documentation? Are lots of code samples enough for you? Do you prefer something brief and terse like what you find in the Help system (usually)? Or does an 800 page training package sound like the right solution for you?

Posted by Peter Vogel on 05/26/2010 at 1:16 PM

comments powered by Disqus
Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.