Hi,
I am trying to add a style to igCombo using htmlattributes property as shown below:
@(Html .Infragistics() .Combo().ID("CategoryList") .MultiSelection(ComboMultiSelection.OnWithCheckboxes) .Width("200px") .HtmlAttributes(new System.Collections.Generic.Dictionary<string,object>().Add("class" , (object)"span-text"))
.Height("20px") .ValueKey("TagKey") .TextKey("AttributeName") .Mode(ComboMode.DropDown) .SelectedValues(ViewBag.CategoryListSelected) .DataSource(ViewBag.CategoryList) .DataBind() .Render() )
The code is throwing error of invalid arguments. Whats wrong here ??
HtmlAttribute did not work for me. I am trying to solve the Site Improvement accessibility issue (Input field has no description). I used Below given is the code that i am using
@(Html.Infragistics().ComboFor(item => item.ReportParameters.MerchantName) .ID("CBMerchant") .Width("100%") .DataSource(Url.Content("~/MerchantTransactions/Entities?Type=Merchant&IsoId=" + Model.ReportParameters.ISOID)) .ValueKey("ID") .TextKey("Name") .HtmlAttributes(new System.Collections.Generic.Dictionary<string, object>() { { "aria-label", "merchName" } }) .AddClientEvent(ComboClientEvents.SelectionChanged, "MerchantChanged") .DataBind() .Render() )
When i inspect the Html i cannot find the HtmlAttribute "aria-label"
Please help.
Hi,Try with this code:
The only difference between your code and this code is in HtmlAttributes method (line 6).
Hope this helps,Martin PavlovInfragistics, Inc.