This is a migrated thread and some comments may be shown as answers.

RadGrid set Edit True forces ArgumentNullException

4 Answers 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 05 Nov 2015, 01:01 PM

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

4 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 10 Nov 2015, 07:54 AM
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
0
Jan
Top achievements
Rank 1
answered on 10 Nov 2015, 08:17 AM

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?

0
Konstantin Dikov
Telerik team
answered on 10 Nov 2015, 08:25 AM
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
0
Jan
Top achievements
Rank 1
answered on 10 Nov 2015, 09:57 AM
I have found that using "FireCommandEvent("Edit", null)" combined with item.Edit = true solves the problem... whatever :O
Tags
Grid
Asked by
Jan
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Jan
Top achievements
Rank 1
Share this question
or