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)
    {

    }