November Happy Hour will be moved to Thursday December 5th.

SearchDataSource with select parameter doesnt work in Edit GUI Plugin

Vote:
 

Hi all,

I have written a plugin for editMode that contains searching functionality. However, if I specify a select parameter (which refers to a dynamic property), I get an 'Object reference not set to an instance of an object' exception.

Here is the markup:

<EPiServer:SearchDataSourceID="SearchDataSource"runat="server"EnableVisibleInMenu="false">
<SelectParameters>
   <EPiServer:PropertyParameterName="PageLink"PropertyName="d_AssetsRoot"/>
</SelectParameters>
</EPiServer:SearchDataSource>

and here is the error:

[NullReferenceException: Object reference not set to an instance of an object.]
   EPiServer.Web.WebControls.PropertyParameter.Evaluate(HttpContext context, Control control) +148
   System.Web.UI.WebControls.Parameter.UpdateValue(HttpContext context, Control control) +69
   System.Web.UI.WebControls.ParameterCollection.UpdateValues(HttpContext context, Control control) +112
   EPiServer.Web.WebControls.PageDataSource.LoadCompleteEventHandler(Object sender, EventArgs e) +60
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.OnLoadComplete(EventArgs e) +11057517
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3159

If the select parameter is not set, then the exception is not thrwon, however, as I have not specified where to search from, I dont get any results.

Any help would be much appreciated.
Thank You

#51150
May 25, 2011 13:47
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.