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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DataTextField don't work fine if it isn't string

Thread ID:

Created:

Updated:

Platform:

Replies:

120624 Sep 28,2015 03:50 PM UTC Oct 2,2015 04:24 AM UTC ASP.NET Web Forms 5
loading
Tags: DropDownList
Manolo
Asked On September 28, 2015 03:50 PM UTC

Hi,

I've some DropDownList, similar at this declaracion

<ej:DropDownList ID="ddlTipoOS" runat="server" SelectMethod="GetTiposOS" DataTextField="Codigo" DataValueField="ID" ShowCheckbox="true"></ej:DropDownList>

If DataTextField is a string, it works fine, but if it is an integer, it has an irregular behaviour.

For example, when I check items from a dropdownlist wehre DataTextField is a string, its name is automatically set in dropDownList's text box, but when if the value is an integer not



Kasithangam C [Syncfusion]
Replied On September 29, 2015 12:06 PM UTC

Hi Manolo,

We are unable to reproduce the issue “When pass DataTextField is an integer value, can’t able set it to the dropdown list box”. We are able to set the selected value in dropdown list while passing the DataTextField as integer value. We have prepared the sample based on your requirement. Please refer to the following sample:

Sample: Sample

Please check with the above sample. If you still face the problem, please revert us by modifying the sample based on your application along with replication procedure. Also let us know if there is any other error occurred in your console window while check the value in dropdownlist popup. Share the screen shot error information. This would be helpful for us to serve you.

Regards,
Kasithangam




Manolo
Replied On September 30, 2015 07:41 AM UTC

Hi,

I've modified your project and always works fine, I can't reproduce the behaviour of my project.

So, I've copy my config project into a new project for reproduce the error and with my configuration works wrong.

I attach my demo project

Attachment: Web_ControlOperaciones_fdda6eea.zip

Kasithangam C [Syncfusion]
Replied On October 1, 2015 09:19 AM UTC

Hi Manolo,

On analyzing your sample, we found that you have referred our scripts and CSS references manually and added key settings in web.config file. Also, a script error ““JQuery is not defined”” was thrown in the console window while rendering our controls. To overcome this, remove custom scripts and CSS references and refer only the JQuery script file in Site. Master page.

While enabling LoadEJResourcesFromAssembly and EJResources app key settings in web.config file as shown below code, it will include the necessary script and CSS files as embedded resource from the EJ.Web assembly itself.

<code>
[Web.Config]


<appSettings>

    <add key="LoadEJResourcesFromAssembly" value="true" />

    <add key="EJResources" value="jsrender:true;jqueryeasing:true;globalize:true;themes:true;" />
  </appSettings>
</code>

If you are going to refer scripts and CSS externally, refer the necessary scripts and CSS files in Site.Master page and set false to the LoadEJResourcesFromAssemblykey which is in the web.config file, it will skip the scripts and CSS files reference from assembly.

<code>

<appSettings>

    <add key="LoadEJResourcesFromAssembly" value="false" />   
  </appSettings>
</code>

We have modified your sample based on this for your reference,

Sample: Sample

Now, you can set the value to the dropdownlist when the DataTextField is passed as an integer value.


Regards,

Kasithangam


Manolo
Replied On October 1, 2015 09:58 AM UTC

Ok!

Thank you very much!

Saranya Sivakumar [Syncfusion]
Replied On October 2, 2015 04:24 AM UTC

Hi Manolo,

Thanks for your update.

Please let us know you have any other queries.

Regards,

Saranya.S


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;