I cant get the igCombo to show the dropdown button
it is there but grey
@{IEnumerable<Intranet.mvc.Models.Status> List = ViewBag.Status;}@(Html.Infragistics().ComboFor(m => m.Status).TextKey("Status1").TextKeyType(ComboDataType.String).ValueKey("ID").ValueKeyType(ComboDataType.Number).DropDownOnFocus(true).Mode(ComboMode.DropDown).ShowDropDownButton(true).ValidatorOptions(option => option.Required(true)).DataSource(List).DataBind().Render())
Hi Christian Sandoy,
Can you clarify what the problem with the grey button is? Because the default theme shows grey button, when hovered it becomes blue etc. Are you able to open the Drop Down list?
Thanks,
Yes I am unable to open the drop Down list
I'm reusing your code to instantiate the combo with the following code inside the Controller
private IEnumerable<Customer> GetCustomers()
{
return new List<Customer>
new Customer { ID=1, Name="John Smith", IsActive=true },
new Customer { ID=2, Name="Bob Richards", IsActive=false },
new Customer { ID=3, Name="Marge Wright", IsActive=false },
new Customer { ID=4, Name="Dwight Long", IsActive=true },
new Customer { ID=5, Name="Amy Grant", IsActive=true },
};
}
If you have similar code and you have the result assigned to a variable Status in your ViewBag, Than I'll suggest you to check (vie some browser debbuger - Firebud, Dev tools etc. ) the generated igCombo script. And more specific the dataSource property - in your case it should contain all the data from your List of Status, but in JSON format. If it's not there then the problem is in the Data Serialization between you Controller and your View.
I have tried this but no luck
List<OmvisningsTyper> lstOmvisninger = new List<OmvisningsTyper>();lstOmvisninger.Add(new OmvisningsTyper { ID = 0, OmvisType = "Ingen" });lstOmvisninger.Add(new OmvisningsTyper { ID = 1, OmvisType = "ARoS" });lstOmvisninger.Add(new OmvisningsTyper { ID = 2, OmvisType = "ARoS mini" });lstOmvisninger.Add(new OmvisningsTyper { ID = 3, OmvisType = "Kunst" });lstOmvisninger.Add(new OmvisningsTyper { ID = 4, OmvisType = "Særudstilling" });ViewBag.OmvisningsTyper = lstOmvisninger.AsEnumerable();
@{IEnumerable<Intranet.mvc.Models.OmvisningsTyper> oList = ViewBag.OmvisningsTyper;}@(Html.Infragistics().ComboFor(m => m.Omvisning).TextKey("OmvisType").TextKeyType(ComboDataType.String).ValueKey("ID").ValueKeyType(ComboDataType.Number).DropDownOnFocus(true).Mode(ComboMode.DropDown).ShowDropDownButton(true).DataSource(oList).DataBind().Render())
It's weird.
On first sight your implementation seems fine to me. Any errors inside the browser console? Have you checked the script tag which is injected to instantiate igCombo?
The code in the browser look like this
<span id="Arrangementet.Omvisning"><input name="Arrangementet.Omvisning" type="hidden" /></span><script type="text/javascript">//<!--<![CDATA[$(function () {$('#Arrangementet\\.Omvisning').igCombo({ filterExprUrlKey: 'filter', selectedItems: [{value:0}], textKey: 'OmvisType', textKeyType: 'string', valueKey: 'ID', valueKeyType: 'number', dropDownOnFocus: true, mode: 'dropdown', showDropDownButton: true, inputName: 'Arrangementet.Omvisning', loadOnDemandSettings: null, dataSource: [{"OmvisType":"Ingen","ID":0},{"OmvisType":"ARoS","ID":1},{"OmvisType":"ARoS mini","ID":2},{"OmvisType":"Kunst","ID":3},{"OmvisType":"Særudstilling","ID":4}] });});//]]>--></script>
I found that I need to load the styleschhets i correct order like this
<link href="~/Content/themes/overcast/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" />
<link href="~/Content/IG/structure/infragistics.css" rel="stylesheet" />
Strange is in my test project it did not matter, maybe because I only have only one control on the page
Oops looked at runtime ver. not version which is 5.0
The System.Web.Mvc.dll in the project is ver. 4.0.30319
Hello Christian,
The new MVC project in VS 2013 (.net 4.5) uses System.Web.Mvc.dll version 5. Since the Infragistics.Web.Mvc.dll 4.13.1.* is compiled against System.Web.Mvc.dll v 4 there are problems when using Infragistics.Web.Mvc.dll v 4.13.1.* in VS 2013. That's why we will release a new version of Infragistics.Web.Mvc.dll which is compiled against System.Web.Mvc.dll v 5 in order to support VS 2013. This will happen in the next service release for 13.1.
Best regards,Martin PavlovInfragistics, Inc.
I created a new mvc project in vs 2013 (.net 4.5)When I use comboFor I got this error : Entry Point not found exceptionbut when i use combo no error
Then I created the same project in vs 2012there comboFor worked as it should