I have am using cascading combo boxes but instead of getting the value from the server, I want to filter the existing data sources locally. This is because the query is slow and when the page loads, I have all the data locally. The model I have bound currently has two properties. The Text/Value field and an ID. The ID tells me the parent so I can map it back.
Location Model: [LocationName] [LocationId]
Parent Combo Box: [Text]: LocationName [Value]: LocationIdItem Model: [ItemName] [LocationId]Combo Box: [Text/Value]: Item.ItemName
In the datasource, how do I get the Location Id? It only gives me the name. I think I need to create the data source separately from the control then bind it manually but I don't see an easy way to do this in Razor. Thoughts?
I took an alternative route. I created a hidden igGrid with all the data I needed and then when I needed to access it or filter it I called the proper methods and reset the data source accordingly. It works flawlessly, very quick and supports unlimited number of data elements.
Good sample example. It helped me with the razor syntax using cascading comboboxes. If you could post this example on the samples web site, I think it would be helpful to other developers looking for the razor syntax especially how to use CascadingSettings.
Hello Daniel,
I am attaching a sample illustrating how igCombos may be configured as cascading via Razor. In this particular scenario I would suggest using individual datasources (as they are already available) rather than setting up cascading sources. Some additional discussions which may be helpful in this case can be found at:
http://es.infragistics.com/community/forums/t/79739.aspx
http://es.infragistics.com/community/forums/t/80341.aspx
Hope this helps. Please do not hesitate to contact me if you have any questions.