Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / SharePoint 2007 > Integrating Controls > telerik:RadGrid -> OnItemDataBound: InteropServices.COMException on MOSS 2007 server

Not answered telerik:RadGrid -> OnItemDataBound: InteropServices.COMException on MOSS 2007 server

Feed from this thread
  • Pratik avatar

    Posted on Jun 23, 2010 (permalink)

     protected void RadGrid1_ItemDataBound(object source, Telerik.Web.UI.GridCommandEventArgs e) 
            { 
                /*if(e.Item is GridDataItem)
                {
                    GridDataItem dataBoundItem = e.Item as GridDataItem;
                    DataRowView dataRowView = e.Item.DataItem as DataRowView;
                    HtmlAnchor editLink = dataBoundItem["Title"].FindControl("editLink") as HtmlAnchor;
                    editLink.Disabled = false;
                }*/ 
            } 
    <
    telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true" PageSize="8" OnItemUpdated="RadGrid1_ItemUpdated" 
                                        ShowStatusBar="true" AllowSorting="true" OnUpdateCommand="RadGrid1_UpdateCommand" 
                                        OnDeleteCommand="RadGrid1_DeleteCommand" OnEditCommand="RadGrid1_EditCommand" 
                                        OnInsertCommand="RadGrid1_InsertCommand" EnableViewState="true" OnPageIndexChanged="RadGrid1_PageIndexChanged" 
                                        OnPageSizeChanged="RadGrid1_PageSizeChanged" OnSortCommand="RadGrid1_SortCommand" 
                                        OnCancelCommand="RadGrid1_CancelCommand" OnItemDataBound="RadGrid1_ItemDataBound"
    Hi,
    I have implemented 'telerik:RadGrid' on SharePoint ASPX page. When i attach 'OnItemDataBound' event on RadGrid, SharePoint ASPX page throws COMException:

    Server Error in '/' Application.

    Cannot complete this action.

    Please try again.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Runtime.InteropServices.COMException: Cannot complete this action.

    Please try again.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [COMException (0x80004005): Cannot complete this action.

    Please try again.]
    Microsoft.SharePoint.Library.SPRequestInternalClass.GetFileAndMetaInfo(String bstrUrl, Byte bPageView, Byte bPageMode, Byte bGetBuildDependencySet, String bstrCurrentFolderUrl, Boolean& pbCanCustomizePages, Boolean& pbCanPersonalizeWebParts, Boolean& pbCanAddDeleteWebParts, Boolean& pbGhostedDocument, Boolean& pbDefaultToPersonal, String& pbstrSiteRoot, Guid& pgSiteId, UInt32& pdwVersion, String& pbstrTimeLastModified, String& pbstrContent, Byte& pVerGhostedSetupPath, UInt32& pdwPartCount, Object& pvarMetaData, Object& pvarMultipleMeetingDoclibRootFolders, String& pbstrRedirectUrl, Boolean& pbObjectIsList, Guid& pgListId, UInt32& pdwItemId, Int64& pllListFlags, Boolean& pbAccessDenied, Guid& pgDocId, Byte& piLevel, UInt64& ppermMask, Object& pvarBuildDependencySet, UInt32& pdwNumBuildDependencies, Object& pvarBuildDependencies, String& pbstrFolderUrl, String& pbstrContentTypeOrder) +0
    Microsoft.SharePoint.Library.SPRequest.GetFileAndMetaInfo(String bstrUrl, Byte bPageView, Byte bPageMode, Byte bGetBuildDependencySet, String bstrCurrentFolderUrl, Boolean& pbCanCustomizePages, Boolean& pbCanPersonalizeWebParts, Boolean& pbCanAddDeleteWebParts, Boolean& pbGhostedDocument, Boolean& pbDefaultToPersonal, String& pbstrSiteRoot, Guid& pgSiteId, UInt32& pdwVersion, String& pbstrTimeLastModified, String& pbstrContent, Byte& pVerGhostedSetupPath, UInt32& pdwPartCount, Object& pvarMetaData, Object& pvarMultipleMeetingDoclibRootFolders, String& pbstrRedirectUrl, Boolean& pbObjectIsList, Guid& pgListId, UInt32& pdwItemId, Int64& pllListFlags, Boolean& pbAccessDenied, Guid& pgDocId, Byte& piLevel, UInt64& ppermMask, Object& pvarBuildDependencySet, UInt32& pdwNumBuildDependencies, Object& pvarBuildDependencies, String& pbstrFolderUrl, String& pbstrContentTypeOrder) +625

    [SPException: Cannot complete this action.

    Please try again.]
    Microsoft.SharePoint.Library.SPRequest.GetFileAndMetaInfo(String bstrUrl, Byte bPageView, Byte bPageMode, Byte bGetBuildDependencySet, String bstrCurrentFolderUrl, Boolean& pbCanCustomizePages, Boolean& pbCanPersonalizeWebParts, Boolean& pbCanAddDeleteWebParts, Boolean& pbGhostedDocument, Boolean& pbDefaultToPersonal, String& pbstrSiteRoot, Guid& pgSiteId, UInt32& pdwVersion, String& pbstrTimeLastModified, String& pbstrContent, Byte& pVerGhostedSetupPath, UInt32& pdwPartCount, Object& pvarMetaData, Object& pvarMultipleMeetingDoclibRootFolders, String& pbstrRedirectUrl, Boolean& pbObjectIsList, Guid& pgListId, UInt32& pdwItemId, Int64& pllListFlags, Boolean& pbAccessDenied, Guid& pgDocId, Byte& piLevel, UInt64& ppermMask, Object& pvarBuildDependencySet, UInt32& pdwNumBuildDependencies, Object& pvarBuildDependencies, String& pbstrFolderUrl, String& pbstrContentTypeOrder) +748
    Microsoft.SharePoint.SPWeb.GetWebPartPageContent(Uri pageUrl, PageView requestedView, HttpContext context, Boolean forRender, Boolean includeHidden, Boolean mainFileRequest, Boolean fetchDependencyInformation, Boolean& ghostedPage, Byte& verGhostedPage, String& siteRoot, Guid& siteId, Int64& bytes, Guid& docId, UInt32& docVersion, String& timeLastModified, Byte& level, Object& buildDependencySetData, UInt32& dependencyCount, Object& buildDependencies, SPWebPartCollectionInitialState& initialState, Object& oMultipleMeetingDoclibRootFolders, String& redirectUrl, Boolean& ObjectIsList, Guid& listId) +2578
    Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.FetchWebPartPageInformationForInit(HttpContext context, SPWeb spweb, Boolean mainFileRequest, String path, Boolean impersonate, Boolean& fGhostedPage, Byte& verGhostedPage, Guid& docId, UInt32& docVersion, String& timeLastModified, SPFileLevel& spLevel, String& masterPageUrl, String& customMasterPageUrl, String& webUrl, String& siteUrl, Guid& siteId, Object& buildDependencySetData, SPWebPartCollectionInitialState& initialState, String& siteRoot, String& redirectUrl, Object& oMultipleMeetingDoclibRootFolders, Boolean& objectIsList, Guid& listId, Int64& bytes) +2081
    Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.GetFileForRequest(HttpContext context, SPWeb web, Boolean exclusion, String virtualPath) +727
    Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.InitContextWeb(HttpContext context, SPWeb web) +164
    Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context) +665
    Microsoft.SharePoint.WebControls.SPControl.GetContextWeb(HttpContext context) +41
    Microsoft.SharePoint.WebControls.SPControl.GetContextSite(HttpContext context) +49
    Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.GetSiteForRequestFile() +51
    Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.FetchWebPartPageInformationForInit(HttpContext context, SPWeb spweb, Boolean mainFileRequest, String path, Boolean impersonate, Boolean& fGhostedPage, Byte& verGhostedPage, Guid& docId, UInt32& docVersion, String& timeLastModified, SPFileLevel& spLevel, String& masterPageUrl, String& customMasterPageUrl, String& webUrl, String& siteUrl, Guid& siteId, Object& buildDependencySetData, SPWebPartCollectionInitialState& initialState, String& siteRoot, String& redirectUrl, Object& oMultipleMeetingDoclibRootFolders, Boolean& objectIsList, Guid& listId, Int64& bytes) +1824
    Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.FetchWebPartPageInformation(HttpContext context, String path, Boolean impersonate, Boolean& fGhostedPage, Byte& verGhostedPage, Guid& docId, UInt32& docVersion, String& timeLastModified, SPFileLevel& level, String& masterpageUrl, String& customMasterPageUrl, String& webUrl, String& siteUrl, Guid& siteId, Object& buildDependencySetData) +475
    Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.GetWebPartPageData(HttpContext context, String path, Boolean throwIfFileNotFound) +1559
    Microsoft.SharePoint.ApplicationRuntime.SPVirtualFile.GetFile(String virtualPath, Boolean fetchContent) +148
    Microsoft.SharePoint.ApplicationRuntime.SPVirtualFile.GetFile(String virtualPath) +43
    Microsoft.SharePoint.ApplicationRuntime.SPVirtualPathProvider.GetFile(String virtualPath) +290
    System.Web.Hosting.VirtualPathProvider.GetFileWithCheck(String virtualPath) +31
    System.Web.FormatterWithFileInfo.GetSourceFileLines(String fileName, Encoding encoding, String sourceCode, Int32 lineNumber) +205
    System.Web.DynamicCompileErrorFormatter.get_MiscSectionContent() +766
    System.Web.ErrorFormatter.GetHtmlErrorMessage(Boolean dontShowSensitiveInfo) +998
    System.Web.HttpResponse.WriteErrorMessage(Exception e, Boolean dontShowSensitiveErrors) +11056428
    System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e) +461


    Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.492




    While if remove the "OnItemDataBound" event then RadGrid just works fine.

    Reply

  • Posted on Jun 25, 2010 (permalink)

    I'm not sure what is the actual cause for the error, but to me it seems not connected to Telerik as there is no trace of Telerik classes in the stack trace.
    A quick google search have found some similar errors, for example:

    http://support.microsoft.com/?id=909455
    http://www.sharepointdev.net/sharepoint--general-question-answers-discussion/cannot-complete-this-action-3119.shtml

    Maybe you can try those and see it something is applicable in your scenario.

    --BH

    Reply

  • Pranav avatar

    Posted on Dec 4, 2011 (permalink)

    Fairly old post but just thought I should put my 2 cents in here in case it helps someone.

    I had the exact same stack trace. I checked the EventViewer for details. It stated the following:

    Exception information:

    Exception type: HttpCompileException

    Exception message: http://server/MessageCenter/Pages/Inbox.aspx(47): error CS0433: The type 'Telerik.Web.UI.RadAjaxManager' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\Telerik.Web.UI\2010.3.1317.35__121fae78165ba3d4\Telerik.Web.UI.dll' and 'c:\WINDOWS\assembly\GAC_MSIL\Telerik.Web.UI\2011.3.1115.35__121fae78165ba3d4\Telerik.Web.UI.dll'

    So basically I had 2 versions of the Telerik.Web.UI in the GAC. Went to C:\Windows\assembly and uninstalled the 2010 version of the and everything was ok after that.

    Reply

  • Pratik avatar

    Posted on Dec 4, 2011 (permalink)

    Thanks for you suggestion.

    Reply

  • Pratik avatar

    Posted on Dec 4, 2011 (permalink)

    Thanks for your suggestion.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / SharePoint 2007 > Integrating Controls > telerik:RadGrid -> OnItemDataBound: InteropServices.COMException on MOSS 2007 server