radGrid export to Excel dataSource error

6 posts, 0 answers
  1. Art Kedzierski
    Art Kedzierski avatar
    107 posts
    Member since:
    Nov 2009

    Posted 23 Nov 2010 Link to this post

    I have a RadGrid that is filled with a SqlDataSource and an Export to ExcelML button that throws the following error when i try to export it:

    Telerik.Web.UI.NullEnumerableException: Cannot perform this operation when DataSource is not assigned

    There is obviously data in the grid so the DataSource must be assigned. I can find no reference to this error anywhere.
  2. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 23 Nov 2010 Link to this post

    Hello Art,

    This is not a common error. Can you please post your code here? This way I will be able to provide more to-the-point answer.

    Best regards,
    Daniel
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Art Kedzierski
    Art Kedzierski avatar
    107 posts
    Member since:
    Nov 2009

    Posted 24 Nov 2010 Link to this post

    I've moved this to a support ticket so I could send the entire solution.
  5. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 29 Nov 2010 Link to this post

    Hello Art,

    Thank you for the sample project. I suggest that we move this conversation to the support ticket. I will update this forum thread when we find what is causing the issue.

    Regards,
    Daniel
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  6. Blake
    Blake avatar
    2 posts
    Member since:
    Jan 2011

    Posted 06 Feb 2011 Link to this post

    I'm actually getting a similar error now myself, whats the support ticket reference, below is an example code block i have, its a nested list view in another list view, and on the databind it has it but checking the entity itself just through a watch, it has the object assigned.

    protected void enquiryDetail_ItemDataBound(object sender, Telerik.Web.UI.RadListViewItemEventArgs e)
           {
               if (e.Item.ItemType == Telerik.Web.UI.RadListViewItemType.AlternatingItem ||
                   e.Item.ItemType == Telerik.Web.UI.RadListViewItemType.DataItem)
               {
                   Telerik.Web.UI.RadListView radList = (Telerik.Web.UI.RadListView)e.Item.Parent.Parent;
                   mes.business.data.Enquiry dataItem = (mes.business.data.Enquiry)radList.Items[0].DataItem;
     
                   Telerik.Web.UI.RadListView view = (Telerik.Web.UI.RadListView)e.Item.FindControl("productPackageList");
                   if (dataItem.PackageEnquiries.Count == 0)
                       view.DataSource = new List<mes.business.data.PackageEnquiry>();
                   else
                       view.DataSource = dataItem.PackageEnquiries; view.DataBind();
     
                    
               }
           }
  7. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 10 Feb 2011 Link to this post

    Hello Blake,

    Art sent a sample project however we were unable to reproduce the issue locally.
    Your scenario seems to be completely different so I would ask that you provide either a runnable demo or instructions describing how to recreate this behavior.

    Regards,
    Daniel
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017