Datagrid - moss 2007

2 posts, 0 answers
  1. Tai
    Tai avatar
    1 posts
    Member since:
    Feb 2008

    Posted 06 Feb 2008 Link to this post


    My collegues have used telerik datagrid controls in application and looks very cool.

    I am researching on how i can integrate datagrid into MOSS 2007 web parts for my new project. I need to connect to the SQL database through webpart.

    I have not found any information (white paper etc) on how i can intergrate and connect to SQL database from the datagrid through MOSS 2007 web parts and how much effort needed? There is some information for deploying to aspx page but not through web part.

    Thank you for your help.

  2. Sebastian
    Sebastian avatar
    9934 posts

    Posted 07 Feb 2008 Link to this post

    Hello Tai,

    There are lots of clients which have implemented web parts based on RadControls.

    Usually the most difficult thing is to set the RadControlsDir property to valid location because it is a bit tricky in SharePoint environment. Most of the time we suggest copying the /RadControls folder in C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS and then referring to it as "~/_layouts/RadControls".
    Another option is to copy that folder in the root folder of your site and then exclude it from the SharePoint managed paths using stsadm.exe.

    Creating a webpart based should be quite simple - here is a short sample:

    public class MyWebPart : WebPart  
         protected override void CreateChildControls()  
               RadGrid grid = new RadGrid();  
               grid.ID = "myGrid";  
               grid.RadControlsDir = "~/_layouts/RadControls";  
               /* populate your grid based on your requirements */ 
         protected override void RenderWebPart(HtmlTextWriter output)  

    Furthermore, you can find an integration document for RadControls under SharePoint here:

    Finally, connecting the grid to a database will probably be no different than attaching it to database in a standard ASP.NET web site. Review the Populating the control with data chapter from the online documentation for further details on how to supply source for our web grid and bind it.

    Best regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top