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
190
WebExplorerBar Databinding and ItemClick
posted

I'm using the WebExplorerBar (ver 10.2) and I have the following problem.

I'm databinding the explorer bar to a dataset. Then I'm setting from the AutoPostBackFlags the ItemClick property value to "On". Everything is fine up to here. When the user clicks an item of the explorer bar the e.Item property of the server event ItemClick is nothing. Could you please tell me why this happends?

I've made an example that happens this problem.

aspx file

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebExplorerBarTest._Default" %>

<%@ Register Assembly="Infragistics35.Web.v10.2, Version=10.2.20102.1011, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.Web.UI.NavigationControls" TagPrefix="ig" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ig:WebExplorerBar ID="WebExplorerBar1" runat="server" Width="250px">
            <AutoPostBackFlags ItemClick="On" />
            <DataBindings>
                                <ig:ExplorerBarItemBinding DataMember="A" KeyField="A1"
                                    TextField="A2" ValueField="A1" />
                                <ig:ExplorerBarItemBinding DataMember="B" KeyField="B1"
                                    TextField="B2" ValueField="B1" />
                            </DataBindings>
        </ig:WebExplorerBar>
        <br />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    </div>
    </form>
</body>
</html>

Codebehind file

Partial Public Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim ds As New DataSet
            Dim dt1 As New DataTable("A")
            dt1.Columns.Add("A1")
            dt1.Columns.Add("A2")
            dt1.Columns("A1").Unique = True
            dt1.Rows.Add(1, "a")
            dt1.Rows.Add(2, "b")
            ds.Tables.Add(dt1)

            Dim dt2 As New DataTable("B")
            dt2.Columns.Add("B1")
            dt2.Columns.Add("B2")
            dt2.Columns.Add("B3")
            dt2.Columns("B1").Unique = True
            dt2.Rows.Add(10, "a", 1)
            dt2.Rows.Add(20, "b", 1)
            dt2.Rows.Add(30, "c", 2)
            ds.Tables.Add(dt2)

            ds.Relations.Add("rel1", dt1.Columns("A1"), dt2.Columns("B3"), True)

            WebExplorerBar1.DataSource = ds
            WebExplorerBar1.DataBind()
        End If
    End Sub

    Protected Sub WebExplorerBar1_ItemClick(ByVal sender As Object, ByVal e As Infragistics.Web.UI.NavigationControls.ExplorerBarItemClickEventArgs) Handles WebExplorerBar1.ItemClick
        Try
            Label1.Text = e.Item.Value.ToString
        Catch ex As Exception
            Label1.Text = ex.Message
        End Try
    End Sub
End Class

--

Thanks in advance!

Parents
No Data
Reply
  • 3726
    posted

    Hi,

    I remember there was such issue when an explorer bar was bound specifically to data set and it was resolved. Try getting the latest service release 10.2.20102.2018, released some time after 7.July.2010.

    If you still see this problem with the service release, please contact developer support.

    Thanks,

    Lubomir

Children
No Data