Register  Login  
  February 5, 2012  
Search_Blog Minimize
Print  

Blog_Archive Minimize
Print  

Blog    
View_Blog Minimize
Aug 28

Written by: host
Saturday, August 28, 2010 2:50 PM 

So with the latest release of DotNetNuke, the support for Telerik controls has stablized.  I have been waiting to play with the Telerik Grid that is now available via a wrapper class.  Not much as been said about these wrapper classes so I was a little reluctant to play with them until I knew DotNetNuke was using them.  With the Version 5.5 release of DotnetNuke, I believe I would be safe to give it a try. 

My plan was to created a very simple module that display a DataGrid, then convert it use the Telerik RadGrid via the wrapper class.  Here is the routine that displayed the Datagrid:

Private Sub DisplayDataGrid()
    dgDataGrid = New DataGrid
    dgDataGrid.AutoGenerateColumns = True
    dgDataGrid.CellSpacing = 0
    dgDataGrid.GridLines = GridLines.Both
    dgDataGrid.FooterStyle.CssClass = "DataGrid_Footer"
    dgDataGrid.HeaderStyle.CssClass = "DataGrid_Header"
    dgDataGrid.ItemStyle.CssClass = "DataGrid_Item"
    dgDataGrid.AlternatingItemStyle.CssClass = "DataGrid_AlternatingItem"

    dgDataGrid.DataSource = dtProducts
    dgDataGrid.DataBind()

    pnlGrid.Controls.Add(dgDataGrid)
End Sub

The above routine generated the following grid - dtProducts is a datatable containing the result of  "Select Top 10 ProductID, ProductName, QuantityPerUnit, UnitPrice, UnitsInStock, Discontinued FROM Products"

Time to convert the routine to use the wrapper classes. This presented me with my first challenge -- what were the wrapper classes called?  After a bit of poking around in the DotNetNuke Source I discovered DNNGrid.  The DNNGrid Class is part of DotNetNuke.Web.UI.WebControls which is implemented in DotNetNuke.Web.dll.

So I change the Datagrid into the DNNGrid.  Was it as simple as changing the appropriate types?  Actually Yes!.  You need to reference DotNetNuke.Web.dll which will then require Telerik.Web.UI.Dll to be referenced.  With these two references added, I could then add the Imports statement for DotNetNuke.Web.UI.WebControls. Then I could change the reference to DNNGrid as follows:

Private Sub DisplayDNNGrid()
    dgDNNGrid = New DnnGrid
    dgDNNGrid.AutoGenerateColumns = True
    dgDNNGrid.CellSpacing = 0
    dgDNNGrid.GridLines = GridLines.Both
    dgDNNGrid.FooterStyle.CssClass = "DataGrid_Footer"
    dgDNNGrid.HeaderStyle.CssClass = "DataGrid_Header"
    dgDNNGrid.ItemStyle.CssClass = "DataGrid_Item"
    dgDNNGrid.AlternatingItemStyle.CssClass = "DataGrid_AlternatingItem"

    dgDNNGrid.DataSource = dtProducts
    dgDNNGrid.DataBind()

    pnlGrid.Controls.Add(dgDNNGrid)
End Sub

As you can see there is little change. The real change, other than the instance name, is the type - DNNGrid. This code generated the following grid: 

Now all of the RADGrid features are available to you.  Where can you find details on the available feature and how to implement them?  Check out RADGrid  help here  Lots of great examples on how to use the RadGrid Control.

For example, by adding just one line:

gdDNNGrid.AllowSorting = True

Results in column sorting with color!

I hope this helps get you using the new DNNGrid on your next grid based module.

Paul.

Tags:

4 comment(s) so far...

Re: That's Too Easy - Implementing DNNGrid (aka Telerik RadGrid)

What a fun pattern! It's great to hear from you and see what you've sent up to. All of the projects look great! You make it so simple to this. Thanks

By Abercrombie and Fitch Düsseldorf on   Sunday, January 29, 2012 1:33 AM

Re: That's Too Easy - Implementing DNNGrid (aka Telerik RadGrid)

It's great to hear from you and see what you've sent up to. All of the projects look great! You make it so simple to this. Thanks

By Abercrombie Düsseldorf on   Sunday, January 29, 2012 1:35 AM

Re: Chinese Footware - and the removal of...

GameCoach Factory Outlet Onlineare usuallyCoach Factoryin By Coach Outlet Online on   Thursday, February 02, 2012 1:18 AM

beats by dre uk

According to the U.S. national geographic web site reported, beats by dre Einstein states that, gravity can lead to time becomes slower. Now, Cornell university scientists put forward a kind of let time stagnation of solutions, that is, through that light bending happened to create a time loophole, at least on the surface time appeared to stagnation phenomenon. Experts say, is the first real time lens experiment comes a time gap between the experiment, is also the first realize objects in space and in time and invisible experiment.
The new research thought inspiration from recent "invisibility cloak" technology, beats by dre uk the so-called "invisibility cloak" is to make visible light bending happened, so that the target produce invisible effect. Invisible principle is, the light bending around the target object happened instead of direct illuminate to the target object, so that the light wouldn't be scattering and reflection to the observer's vision scope, the object on the surface seem to disappear.
Cornell university scientists using similar methods produce a time loophole, Casque beats by dr dre although just a short moment, but time is stagnant for every second about the effect lasts 40 trillion. Cornell university physicist alex-plus "the tower is chief author. Add the tower said, "imagine, you can turn to, let time light, then slowly to speed up, so you can produce a gap in the beam. In this case, the moment happened in the incident will not scattering light, it looks as if it never happened."
Add the tower for example, "in the museum, sometimes will use laser beam scanning to protect priceless art treasures. The probe in laser beams, suddenly laser beam back and forth constantly scan is blocked or be reserves, such as you walk through no laser laser irradiation place, Casque dr dre at this time the alarm sounded. But, if some equipment can let part of acceleration, deceleration of laser beam, this laser beam can appear moment of laser beam. At this point, Casque beats the situation is again the same position you walk through, so that the probe will not find what happened."
Add the tower of the research published recently in the journal nature on top. In the paper, the researchers introduces the experimental process time stagnation. The probe illuminate a bunch of laser beam, and then through a laser beam called "time lens" equipment. And the traditional lens can occur in the space admiral light bending, time lens can make light appeared in temporary space (the space). Add the tower said that "in time domain, it is a truly able to control beam. The method of attribute

By beats by dre uk on   Friday, February 03, 2012 1:27 AM

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel 

Blog_List Maximize
Print  

  Home | Blog | Forum | Subscriptions | Free Modules | Videos   Page generated in 0.0939024 seconds.
  Copyright 2010 by TressleWorks   Terms Of Use | Privacy Statement