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 Reply Children
No Data