We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Two dropdown list

I'm using two dropdownlist.
One is fill with data but the other one has nullable text in.
when one is not loading data then it is ok.

why?

code vb:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Not Page.IsPostBack Then
            loadRole()
            loadMT()
        End If

    End Sub

    Sub loadRole()

        ddlRoles.DataSource = uma.dohvatiPodatke(conn, "GH_Office_Role")
        ddlRoles.DataTextField = "RoleName"
        ddlRoles.DataValueField = "RoleId"
        ddlRoles.DataBind()

    End Sub

    Sub loadMT()

        ddlMT.DataSource = uma.dohvatiPodatke(conn, "GH_Office_MTDDL")
        ddlMT.DataTextField = "Naziv"
        ddlMT.DataValueField = "MT"
        ddlMT.DataBind()

    End Sub

5 Replies

KV Karthikeyan Viswanathan Syncfusion Team May 8, 2017 08:44 AM UTC

Hi Hrvoje Voda,   
  
Thanks for contacting Syncfusion support.   
  
We were unable to understand your requirement. Please explain the issue replication procedure, it will be helpful to provide a solution at earlier?   
  
Regards,   
Karthikeyan V. 



HV Hrvoje Voda May 8, 2017 09:13 AM UTC

So, I'm using two dropdownlists. For some reason only one is fill with data.The other one has null values.
But, when I disable one and use only one dropdown list then it works fine.



KV Karthikeyan Viswanathan Syncfusion Team May 9, 2017 04:43 PM UTC

Hi Hrvoje Voda, 

Sorry for this inconvenience caused. 

Exactly, We were unable to reproduced your reported issue. So, could you please share the issue reproducing sample for this issue or kindly modify the shared sample as reproducible one and revert it to us.. It will be helpful to provide a solution at earlier.  

Regards, 
Karthikeyan V. 



HV Hrvoje Voda May 10, 2017 06:26 AM UTC

I can't run your code because it's using lower version of syncfusion..
this is my code in aspx:

<div>
                              <div style="margin-top:40px;margin-left:30px;float:left">
                                  <asp:Label ID="Label2" runat="server" Text="Role"></asp:Label>
                                 <asp:DropDownList ID="ddlRoles" runat="server" Width="300" OnSelectedIndexChanged ="ddlRoles_ValueSelect" AutoPostBack="True" />
                             </div>                  
                             <div style="margin-top:40px;margin-left:30px;float:left">
                                 <asp:Label ID="Label3" runat="server" Text="Mjesta troška"></asp:Label>                                 
                                 <asp:DropDownList ID="ddlMT" runat="server" OnSelectedIndexChanged ="ddlMT_ValueSelect"></asp:DropDownList>
                             </div><br />
                           <div style="margin-top:130px;width:900px;margin-left:30px;">
                             <asp:Label ID="Label1" runat="server" Text="Useri"></asp:Label>                                                                     
                                    <ej:Grid ID="gvUsers" runat="server" Locale ="hr-HR" AllowFiltering="True" >
                                        <FilterSettings FilterType="Excel" MaxFilterChoices="4" />                                              
                                        <Columns>                                        
                                            <ej:Column Field="UserName" EditType="String"/>                            
                                            <ej:Column Field="Prezime, Ime" EditType="String"/>                            
                                            <ej:Column Field="PartnerID" EditType ="Numeric" /> 
                                        </Columns>                     
                                    </ej:Grid>    
                            </div>
                    </div>

I send vb code in previous mail.



KV Karthikeyan Viswanathan Syncfusion Team May 11, 2017 07:00 AM UTC

Hi Hrvoje Voda,    
 
We have analyzed your share code example. You are using asp dropdown list control not a Syncfusion control. We are modify the same based on your downloaded version. kindly modify the shared sample as reproducible one and revert it to us.. It will be helpful to provide a solution at earlier.   

Please refer to the code example: 

<code> 

<div style="margin-top:40px;margin-left:30px;float:left"> 
                                  <asp:Label ID="Label2" runat="server" Text="Role"></asp:Label> 
                                 <asp:DropDownList ID="ddlRoles" runat="server" Width="300" OnSelectedIndexChanged ="ddlRoles_ValueSelect" AutoPostBack="True" /> 
                             </div>                   
                             <div style="margin-top:40px;margin-left:30px;float:left"> 
                                 <asp:Label ID="Label3" runat="server" Text="Mjesta troška"></asp:Label>                                  
                                 <asp:DropDownList ID="ddlMT" runat="server" OnSelectedIndexChanged ="ddlMT_ValueSelect"></asp:DropDownList> 
                             </div><br /> 


</code> 




Regards, 
Karthikeyan V. 


Loader.
Up arrow icon