ComboBox not visible when using OnClientChange property

Originally Posted 10 May 2013, 10:58 pm EST

  • Originally Posted 10 May 2013, 10:58 pm EST

    I am trying to use a ComboBox and modify it using javascript. However, any time I set a value in the OnClientChange or OnClientSelect properties, the ComboBox is not visible on the page. If I remove the OnClient settings, it shows as expected.

    I tried adding it in the markup and in the code behind. (Both before and after adding items to the list.) I also tried with and without the "()", with and without a ";", and I tried adding "javascript:" before the function name.

    Attached is an example of my code:
    wijmo:C1ComboBox ID="comboSiteList" runat="server" AutoPostBack="True" DropdownWidth="400" DataSelectedField="SiteID" OnClientChanged="ShowHideSitePwd()"
    wijmo:C1ComboBoxColumn DataField="SiteID" Name="SiteID" /
    wijmo:C1ComboBoxColumn DataField="SiteName" Name="Name" Width="300" /
  • Reply

    Also, here is the javascript located in the content section of the page.

    function showHideSitePwd(sender, args) {

    I have also changed the OnClientChanged to look like this:
  • Reply

    I got it to work, but I'm not sure why. I have been changing combinations for a while. It is not setting any values on the page load except for adding items to the list.

    I am using the javascript in the above post and the control looks like this. (AutoPostBack has been removed, but that was after I got the control to be visible.)

    Here is the final ComboBox definition on the page:

    wijmo:C1ComboBox ID="comboSiteList" runat="server" DropdownWidth="400"
  • Reply


    I tried the same on my end for OnClientChanged and OnClientSelect like:

    function C1ComboBox1_OnClientChanged(e, data) {
    var val = data.selectedItem.value;
    alert("I live in " + val + "!");

    <wijmo:C1ComboBox ID="C1ComboBox1" runat="server" DropdownWidth="400" OnClientChanged="C1ComboBox1_OnClientChanged" AutoPostBack="True">
    <wijmo:C1ComboBoxItem Value="AL" Text="Alabama"></wijmo:C1ComboBoxItem>
    <wijmo:C1ComboBoxItem Value="AK" Text="Alaska"></wijmo:C1ComboBoxItem>
    <wijmo:C1ComboBoxItem Value="AZ" Text="Arizona"></wijmo:C1ComboBoxItem>

    This seems to work fine on my end, can you check the build on your end and test it with 2013.111
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels