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
DataFilter.RefreshDataGridView(DataFilter2_OnFilterAdded))
End Sub
Protected Overrides Sub OnLoadComplete(ByVal e As EventArgs)
If Not Page.IsPostBack Then
DataFilter2.BeginFilter()
DataFilter2.AddNewFilter("Emp_ID", "Emp_Name", "Dav")
End If
End Sub
Private Sub DataFilter2_OnFilterAdded()
Try
DataFilter2.FilterSessionID = "Default.aspx"
DataFilter2.FilterDataSource()
GridView1.DataBind()
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