Binding RadGrid to SPDataSource

3 posts, 0 answers
  1. baha2r
    baha2r avatar
    8 posts
    Member since:
    Apr 2009

    Posted 11 May 2009 Link to this post

    Hi,
    I am fairly new to Telerik controls ,I'm basically  trying to programmatically bind a RadGrid to  SharePoint SPDataSource control in a WebPart but after doing so the grid shows SPDataSource's properties such as "UseInternalName" instead of it contents, I don't have the code at the time but it looks something like this:

    SPDataSource spdc =new SPDataSource();
    spdc.DataSourceMode = SPDataSourceMode.List;
    SPList list1=...
    spdc.list=list1;
    radGrid grid1=new radGrid();
    grid1.DataSource =spdc;
    // for columns I tried both generate automatically
    //option and adding a field for "Title" for example
    grid1.databind();



    So my main question is :
    Does RadGrid support SPDataSource? and if yes what am I doing wrong? If not ,are there any alternate ways of doing this?what are my options?

    Thanks in Advance
  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 11 May 2009 Link to this post

    Hi baha2r,

    I think that the second post by my colleague Stephen in this thread will help you bind our web grid to Sharepoint list. It is recommended to use advanced binding with NeedDataSource event handling.

    Best,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

  3. baha2r
    baha2r avatar
    8 posts
    Member since:
    Apr 2009

    Posted 11 May 2009 Link to this post

     Sebastian, thank you that was a very quick response! :)
    I've been googling for this the past two days but did not encounter links you just send! anyway I'm gonna try these tomorrow, thanks again.
    With Regards
Back to Top