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
1845
MVC Helper - DataSource excluding object properties
posted

In my MVC Helper, I'm assigning an object with 4 properties to the igCombo.DataSource, and referencing those properties by name in igCombo.ItemTemplate string, as the examples show.

However, it seems that the helper, during rendering, strips the datasource of all properties except the one's assigned to "TextKey" and "ValueKey", or, if neither is assigned, the first property in the datasource.  Is this by-design?  If so, how do I get around it?

The control renders perfectly if I pass the datasource as json and then initialize it client-side, but once again, it seems the behavior for the MVC Helper is different than the jQuery behaivior, and the only documentation I found uses a URL as the datasource:

http://samples.infragistics.com/jquery/combo-box/templating