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

FilterCheckListItemsRequested Event Not Firing

5 Answers 302 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bethany
Top achievements
Rank 1
Bethany asked on 09 Mar 2017, 06:45 PM

Hello,

 

I have a RadGrid that is using the Header Context filtering and I am trying to bind the list boxes, but I received this kind of error:

 

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compilation Error Message: BC30456: 'radGrid1_FilterCheckListItemsRequested" is not a member of 'ASP.cad_cadlog_aspx'.

 

I'm following everything that the Telerik demo for Excel-filtering says to include, but I receive the above error regardless. I've copy/pasted what the event name is and everything. Still no luck. Here is my RadGrid code:

<Telerik:RadGrid ID="radGrid1" runat="server" ShowFooter="true" Width="100%" Height="650px" Visible="true" DataSourceID="dsCADLog" AllowFilteringByColumn="true" FilterType="HeaderContext" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" OnFilterCheckListItemsRequested="radGrid1_FilterCheckListItemsRequested">

5 Answers, 1 is accepted

Sort by
0
Bethany
Top achievements
Rank 1
answered on 09 Mar 2017, 09:34 PM

I realize this may need some more information. So...

 

Here is an example of one of my columns:

<Telerik:GridBoundColumn DataField="Project" HeaderText="Project" SortExpression="Project" UniqueName="Project" ReadOnly="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="5%" FilterCheckListEnableLoadOnDemand="true" />

 

And the VB code for the event in question:

Protected Sub rgCadLog_FilterCheckListItemsRequested(sender As Object, e As Telerik.Web.UI.GridFilterCheckListItemsRequestedEventArgs)
 
Dim dataField As String = TryCast(e.Column, IGridDataColumn).GetActiveDataField()
 
e.ListBox.DataSource = GetDataTable(dataField)
e.ListBox.DataKeyField = dataField
e.ListBox.DataTextField = dataField
e.ListBox.DataValueField = dataField
e.ListBox.DataBind()
End Sub

 

I have tried several different things for the VB event code, such as: setting the event to private, adding a handler to the event, setting the event to protected and removed aspx declaration when using handling. The listbox area looks like it shows up the way I have it currently coded (which is the code preview above), but the checklist event does not fire and when I click on the area I get an invalid viewstate JavaScript error.

 

I need help to resolve this as soon as possible as I have business users to answer to. Thank you.

 

0
Eyup
Telerik team
answered on 10 Mar 2017, 03:04 PM
Hi Bethany,

The error indicates that there is issue connecting the event handler. And indeed, the names are different:
OnFilterCheckListItemsRequested="radGrid1_FilterCheckListItemsRequested"

While on VB code-behind it is called:
rgCadLog_FilterCheckListItemsRequested

Please make them have the same name and the issue should be resolved.

I am also sending a sample RadGrid web site to demonstrate a practical implementation.
I hope this will prove helpful.

Regards,
Eyup
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Bethany
Top achievements
Rank 1
answered on 10 Mar 2017, 03:06 PM
Eyup, I copy/pasted from my code and was renaming the RadGrid for privacy reasons. The names are the same, just did not change the VB code behind one. I'll take a look at the sample.
0
Bethany
Top achievements
Rank 1
answered on 10 Mar 2017, 03:25 PM
I have double checked that the RadGrid aspx declarations and the code behind match, but I am still getting the ASP error.
0
Marin Bratanov
Telerik team
answered on 15 Mar 2017, 09:53 AM

Hi Bethany,

I am attaching a simple VB page that works. Note the AutoEventWireup property in the Page directive and the Handles clauses in the .vb file.

If you keep getting the errors, I advise you copy the markup, then go to the .vb file and use the dropdowns at the top of the text editor that VS providse so you can add the handles. This will let VS update the .designer file as well, if you are using a WebApplication. Then, you can copy the rest of the code.

Regards,

Marin Bratanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Bethany
Top achievements
Rank 1
Answers by
Bethany
Top achievements
Rank 1
Eyup
Telerik team
Marin Bratanov
Telerik team
Share this question
or