Hi,
I'm trying to set up a rad filter from code.
This works as expected:
This doesn't:
When configured programatically, I'm getting the following error as soon as I try to add an expresion (via the UI when the page is running):
Any suggestions? Doing this declaratively is not an option for me and I will not have a grid or other "FilterContainer" available.
-Al
I'm trying to set up a rad filter from code.
This works as expected:
<telerik:RadFilter ID="RadFilter1" runat="server"> |
<FieldEditors> |
<telerik:RadFilterTextFieldEditor DataType="System.String" FieldName="MyColumn" /> |
</FieldEditors> |
</telerik:RadFilter> |
This doesn't:
<telerik:RadFilter ID="RadFilter1" runat="server"> |
</telerik:RadFilter> |
protected void Page_Load(object sender, EventArgs e) |
{ |
RadFilterTextFieldEditor editor = new RadFilterTextFieldEditor(); |
editor.FieldName = "MyColumn"; |
editor.DataType = typeof(System.String); |
RadFilter1.FieldEditors.Add(editor); |
} |
When configured programatically, I'm getting the following error as soon as I try to add an expresion (via the UI when the page is running):
Exception of type 'System.Web.HttpUnhandledException' was thrown. |
==> Parameter cannot be null or empty. |
Parameter name: fieldName |
Stack Traces |
Source: System.Web |
at System.Web.UI.Page.HandleError(Exception e) |
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) |
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) |
at System.Web.UI.Page.ProcessRequest() |
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) |
at System.Web.UI.Page.ProcessRequest(HttpContext context) |
at ASP.junk_filters_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\bit9.console.web.ui\f02bb933\1bce73bb\App_Web_filters.aspx.83447962.uwhliv7r.0.cs:line 0 |
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() |
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) |
==> Source: Telerik.Web.UI |
at Telerik.Web.UI.RadFilterDataFieldEditorCollection.RetrieveEditorForFieldName(String fieldName) |
at Telerik.Web.UI.RadFilterSingleExpressionItem.SetupFunctionInterface(Control container) |
at Telerik.Web.UI.RadFilterExpressionItem.CreateFunctionalInterface() |
at Telerik.Web.UI.RadFilterExpressionItem.InitializeItem() |
at Telerik.Web.UI.RadFilter.CreateFilterItems() |
at Telerik.Web.UI.RadFilter.CreateControlHierarchy() |
at Telerik.Web.UI.RadFilter.CreateChildControls() |
at System.Web.UI.Control.EnsureChildControls() |
at Telerik.Web.UI.RadFilter.EnsureItemsCreated() |
at Telerik.Web.UI.RadFilter.RecreateControl() |
at Telerik.Web.UI.RadFilter.AddChildExpression(RadFilterGroupExpressionItem groupItem, Boolean isGroup) |
at Telerik.Web.UI.RadFilterCommandEventArgs.ExecuteCommand(Object source) |
at Telerik.Web.UI.RadFilter.OnBubbleEvent(Object source, EventArgs args) |
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) |
at Telerik.Web.UI.RadFilterExpressionItem.OnBubbleEvent(Object source, EventArgs args) |
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) |
at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) |
at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) |
at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) |
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) |
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) |
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) |
Any suggestions? Doing this declaratively is not an option for me and I will not have a grid or other "FilterContainer" available.
-Al