Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
465
Server Side Events not Firing
posted

All,

I'm trying to take a 2011 vol 1 UltraWebListBar and upgrade it to a 2013 Web Explorer Bar.  I was hoping to just take the code behind and modify slightly and all would be good.  The problem I am having is that none of the Server Side ItemClick events are firing.  There is a lot going on in the page in question so I just created a simple page with the one control, but still none of the server side events would fire.  I'm not sure what I am doing wrong here and any help would be great.

I've got some over simplified source below:

Aspx:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

<%@ Register Assembly="Infragistics4.Web.v13.2, Version=13.2.20132.2028, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI.EditorControls" TagPrefix="ig" %>
<%@ Register Assembly="Infragistics4.Web.v13.2, Version=13.2.20132.2028, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI.NavigationControls" TagPrefix="ig" %>
<!DOCTYPE html >
<html>
<head runat="server">
<title></title>
<script language="javascript" type="text/javascript">

function uwlbMainMenu_BeforeItemSelected(sender, args) {

var itemValue = args.getExplorerBarItem().get_value();

}

</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager" runat="server" AsyncPostBackTimeout="360000" />
<ig:WebExplorerBar ID="uwlbMainMenu" runat="server" Width="250px">
</ig:WebExplorerBar>
</form>
</body>
</html>

VB:

Option Explicit On

Imports System
Imports System.Collections
Imports System.Data
Imports System.Data.OracleClient
Imports System.Web
Imports System.Web.SessionState
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports System.Web.Services
Imports System.Web.Script.Services

Partial Class Default2
Inherits System.Web.UI.Page
Private _childFolderId As String

Protected Sub uwlbMainMenu_ItemClick(sender As Object, e As Infragistics.Web.UI.NavigationControls.ExplorerBarItemClickEventArgs) Handles uwlbMainMenu.ItemClick

Dim a As String = "Set Breakpoint here"
a = "Never Got hit"

End Sub

Protected Sub uwlbMainMenu_ItemSelected(sender As Object, e As Infragistics.Web.UI.NavigationControls.ExplorerBarItemSelectedEventArgs) Handles uwlbMainMenu.ItemSelected

Dim a As String = "Set Breakpoint here"
a = "Never Got hit"

End Sub

Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load

uwlbMainMenu_Populate("0")

End Sub

Private Sub uwlbMainMenu_Populate(ByVal PreferedFolderId As String)

uwlbMainMenu.Groups.Clear()

Dim itemIdx As Integer = 0 : Dim groupIdx As Integer = -1 : Dim CurrGroup As String = "" : Dim PrevGroup As String = ""
Dim oConn As OracleConnection = New OracleConnection()
oConn.ConnectionString = "Data Source=XXXXXXXX|Persist Security Info=True|User ID=XXXXXXXX|Password=XXXXXXXXXXXX|"
oConn.Open()

Dim oCmd As New OracleCommand : oCmd.Connection = oConn : oCmd.CommandType = CommandType.Text : Dim rdr As OracleDataReader = Nothing
oCmd.CommandText = "Select Category, Name, Desc, Value, FolderId From Dual Order By Category"
rdr = oCmd.ExecuteReader

Dim appName As String = "" : Dim i As Integer = 1

Do While rdr.Read()

If rdr.Item("application").ToString.Trim = "DS" Then
appName = "APP DS"
ElseIf rdr.Item("application").ToString.Trim = "FIT" Then
appName = "APP FIT"
ElseIf rdr.Item("application").ToString.Trim = "OTH" Then
appName = "APP OTH"
End If

CurrGroup = rdr.Item("Category").ToString.Trim

If CurrGroup <> PrevGroup Then
groupIdx += 1 : itemIdx = 0
uwlbMainMenu.Groups.Add(CurrGroup)
uwlbMainMenu.Groups(groupIdx).Value = "0|0|0|0"
uwlbMainMenu.Groups(groupIdx).Expanded = True
End If

uwlbMainMenu.Groups(groupIdx).Items.Add(rdr.Item("Name").ToString.Trim)
uwlbMainMenu.Groups(groupIdx).Items(itemIdx).Value = String.Format("{0}|{1}|{2}|{3}", appName, rdr("Category").ToString.Trim, rdr("Desc").ToString.Trim, rdr("Value").ToString.Trim)

itemIdx += 1 : PrevGroup = CurrGroup
Loop

rdr.Close()

If Not oCmd Is Nothing Then oCmd.Dispose()
If (Not oConn Is Nothing) AndAlso oConn.State <> ConnectionState.Closed Then oConn.Close()

End Sub


End Class

  • 10685
    Offline posted

    I am checking about the progress of this issue.
    Please let me know if you need any further assistance on this.

  • 10685
    Offline posted

    Hello Joe,

    In order to hit the breakpoints a postback or ajax call should be made to the ServerSide. AutoPostBackFlags tag should be used. I suggest you use one of the following AutoPostBackFlags Tag property’s settings, regarding your application requirements.

    ItemClick="On" /"Async”;
    ItemSelected="On"/"Async”;


    Modified Code From The Attachement:
    <ig:WebExplorerBar ID="uwlbMainMenu" runat="server" Width="250px">
    <AutoPostBackFlags ItemClick="On" ItemSelected="On"/>

    </ig:WebExplorerBar>


    Please let me know if you need further assistance regarding this issue!