what is the error in the bleow: 'Public Event OnFilterAdded()' is an event, and cannot be called directly. Use a
'RaiseEvent' statement to raise an event.

Imports System
Imports System.Collections
Imports System.Configuration
Imports System.Data
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.HtmlControls
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports Tawammar.CustomControls
Partial Class Filter
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
DataFilter2.DataSource = SqlDataSource2
DataFilter2.DataColumns = GridView1.Columns
DataFilter2.FilterSessionID = "Default.aspx"
DataFilter2.OnFilterAdded += (DataFilter2.OnFilterAdded + New
End Sub 
Protected Overrides Sub OnLoadComplete(ByVal e As EventArgs)
If Not Page.IsPostBack Then
DataFilter2.AddNewFilter("Emp_ID", "Emp_Name", "Dav")
End If
End Sub

Private Sub DataFilter2_OnFilterAdded()
DataFilter2.FilterSessionID = "Default.aspx"
Catch e As Exception

End Try
End Sub

i know the erorr in

DataFilter2.OnFilterAdded += new DataFilter.RefreshDataGridView(DataFilter2_OnFilterAdded);

i replaced + with & but it does not work

This article has been dead for over six months. Start a new discussion instead.