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
125
How to use ValueChanged Event?
posted

Hi,

I binding the webdropdown with sqldatasource, but when i choosed the dropdown item,can not cause

the ValueChanged event to fire.

Those are my codes.

CLIENT:

<ig:WebDropDown ID="dpEmp" runat="server" Width="200px"
                        EnableAutoFiltering="Client" DropDownContainerHeight="300px"
                    DataSourceID="SqlDataSource1"  TextField="CN"
                    AutoFilterQueryType="Contains" AutoFilterResultSize="100"
                    AutoFilterTimeoutMs="2000" AutoPostBack="True"
                    onvaluechanged="dpEmp_ValueChanged" DataKeyFields="Code" 
                     ValueField="Code"
                    >
                    <DropDownItemBinding TextField="CN" ValueField="Code"></DropDownItemBinding>
                    <AutoPostBackFlags SelectionChanged="On" ValueChanged="On" />
                </ig:WebDropDown>


                <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                    ConnectionString="<%$ ConnectionStrings:ExpenseLineConnectionString %>"
                   
                    SelectCommand="SELECT Code+Name AS CN, Code FROM TCCEmp WHERE (CCEmp = @CCEmp)">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="E" Name="CCEmp" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>

SERVER:

protected void dpEmp_ValueChanged(object sender, Infragistics.Web.UI.ListControls.DropDownValueChangedEventArgs e)
    {

    }

Parents
  • 125
    posted

    I'm seeing exactly the same behavior. To simplify things and get away from any complications caused by my SQL data source, I created a page with nothing on it other than a simple WedDropDown with a hard coded list of items. No matter what combination of "autopostback" properties I select, neither the SelectionChanged nor ValueChanged events in the VB code behind file fire. Additionally, since I also set a breakpoint in the Page_Load event, I can see that no postback at all is taking place, let alone having those events triggered.

Reply Children