RadGrid set Edit True forces ArgumentNullException

5 posts, 0 answers
  1. Jan
    Jan avatar
    31 posts
    Member since:
    Mar 2014

    Posted 05 Nov 2015 Link to this post

    I have two RadGrids for showing main and detail data.

    I wanted to have an asp:FileUpload in the WebUserControl Editform, so I  made a button to upload, save the new InsertItem and Redirect to the same page, opening the EditForm for the newly inserted item in RadGrid2 as shown here: http://www.telerik.com/forums/how-to-use-a-hyperlink-column-to-redirect-to-a-new-and-load-details-in-a-radgrid.

    Then, on DataBind, the second Grid throws the following error:

    [ArgumentNullException: Der Wert darf nicht NULL sein.
    Parametername: virtualPath]
       System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options) +9893937
       System.Web.UI.TemplateControl.LoadControl(String virtualPath) +18
       Telerik.Web.UI.GridEditFormItem.InitializeUserControlForm(GridColumn[] columns, ControlCollection controls, GridEditFormSettings formSettings) +123
       Telerik.Web.UI.GridEditFormItem.InitializeEditForm(GridColumn[] columns) +6009
       Telerik.Web.UI.GridEditFormItem.Initialize(GridColumn[] columns) +373
       Telerik.Web.UI.GridEditFormItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) +340
       Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) +1155
       Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) +211
       Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +3172
       Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +1150
       System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +67
       System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +128
       System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +34
       System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
       Telerik.Web.UI.GridTableView.PerformSelect() +38
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
       Telerik.Web.UI.GridTableView.DataBind() +392
       Telerik.Web.UI.RadGrid.DataBind() +191
       Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +4238
       Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +201
       System.Web.UI.Control.LoadRecursive() +59
       System.Web.UI.Control.LoadRecursive() +131
       System.Web.UI.Control.LoadRecursive() +131
       System.Web.UI.Control.LoadRecursive() +131
       System.Web.UI.Control.LoadRecursive() +131
       System.Web.UI.Control.LoadRecursive() +131
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678
  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 10 Nov 2015 Link to this post

    Hello Jan,

    As you could notice, the exception indicates that there is something wrong with the paths that you are using, so please ensure that all paths that you are using in your RadGrid settings are correctly configured.

    If any further assistance is needed on this matter, please open a regular support ticket and attach the markup and the code-behind of your pages, so we can inspect them locally.


    Best Regards,
    Konstantin Dikov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Jan
    Jan avatar
    31 posts
    Member since:
    Mar 2014

    Posted 10 Nov 2015 in reply to Konstantin Dikov Link to this post

    Hello Konstantin,

     thanks for your answer. As I don't know about any paths usable by a RadGrid, I suppose it's best to open a ticket?

  4. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 10 Nov 2015 Link to this post

    Hello Jan,

    From the error it seems that there are some paths used in the UserControl that you are using for editing the items in your RadGrid. You can past the markup of the user control here, so we can see if there is something obvious that we can identify as a root of the problem.


    Regards,
    Konstantin Dikov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Jan
    Jan avatar
    31 posts
    Member since:
    Mar 2014

    Posted 10 Nov 2015 in reply to Konstantin Dikov Link to this post

    I have found that using "FireCommandEvent("Edit", null)" combined with item.Edit = true solves the problem... whatever :O
Back to Top