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 SystemImports System.CollectionsImports System.DataImports System.Data.OracleClientImports System.WebImports System.Web.SessionStateImports System.Web.UIImports System.Web.UI.WebControlsImports System.Web.UI.HtmlControlsImports System.Web.ServicesImports 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
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
uwlbMainMenu_Populate("0")
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 Class
I am checking about the progress of this issue. Please let me know if you need any further assistance on this.
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!