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
370
igCombo ItemTemplate returns only TextKey values
posted

I have an ComboBox defined in MVC Razor as follows:

@(Html.Infragistics().ComboFor(item => item.LocationID)
.Width("100%")
.Height("34px")
.ValueKey("ID")
.TextKey("Locationn")
.ItemTemplate("Branch Address: ${BranchAdd1}")
.CompactData(false)
.DataSourceUrl(Url.Action("ComboDataLocation"))
.Render()
)

where the DataSourceUrl returns a model that includes ID,Locationn, and BranchAdd1. When I try the template with BranchAdd1, I get nothing in the dropdown list except for the literal I defined in the template. When I try it with Locationn, I get Locationn values and the literal in the dropdown list. I understand that CompactData should be set to false when I want all the values in the model, but it doesn't seem to be working. What am I missing?



Parents
No Data
Reply
  • 9190
    Offline posted

    Hello,

    I will be happy to assist you with your inquiry.

    May I ask if you can provide me with a screenshot your JSON data as it is after it's serialize from your "ComboDataLocation" Web Service? Do you notice all three members being serialized? Also, can you provide me with the version of IgniteUI you scripts you are using?

    I am looking forward to hearing from you.

Children