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

Parameter name: virtualPath

2 Answers 123 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chuks
Top achievements
Rank 1
Chuks asked on 28 Jun 2018, 01:45 PM

Hi, I'm getting the following error from my RadGrid.. any ideas?
Thank you

Error: Value cannot be null. Parameter name: virtualPath

Stack Trace: at System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options) at Telerik.Web.UI.GridEditFormItem.InitializeUserControlForm(GridColumn[] columns, ControlCollection controls, GridEditFormSettings formSettings) at Telerik.Web.UI.GridEditFormItem.InitializeEditForm(GridColumn[] columns) at Telerik.Web.UI.GridEditFormItem.Initialize(GridColumn[] columns) at Telerik.Web.UI.GridEditFormItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) at Telerik.Web.UI.GridItemBuilder.CreateItems(GridGroupingContext group) at Telerik.Web.UI.GridTableView.CreateItems(IEnumerator enumerator, GridColumn[] columns, ControlCollection controls) at Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) at Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) at System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at Telerik.Web.UI.GridTableViewBase.get_Controls() at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Page.LoadAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 02 Jul 2018, 04:05 PM
Hi Chuks,

Judging from the presence of the InitializeUserControlForm method in the stack trace, it is likely that there is an issue with the user control edit form - perhaps a user control name/path are not specified, or are wrong. The method mostly does a Page.LoadControl(formSettings.UserControlName); and then uses reflection to set its DataItem property. Thus, an exception related to the path is likely caused by an issue with the user control name/path.


Regards,
Marin Bratanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Chuks
Top achievements
Rank 1
answered on 02 Jul 2018, 04:57 PM
Thanks Marin. 
Tags
Grid
Asked by
Chuks
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Chuks
Top achievements
Rank 1
Share this question
or