asp.net mvc 3 - IE9 bug with Html.DropDownListFor -



asp.net mvc 3 - IE9 bug with Html.DropDownListFor -

hello need help bug in net explorer 9. developing crud screens in asp.net 4 mvc 3 razor. in multiple screen utilize @html.dropdowlistfor create easy links foreign keys.

but when few these in ie9 (and ie9) dropdownlist rendered smaller usual size, text displayed few pixels lower normal, , if word displayed larger little amount of characters(not sure number, think it's 10) not rendered. weird part when click on dropdownlist prepare itself.

the view code:

@html.dropdownlistfor(model => model.asset.fkassettypeid, new selectlist(model.assettypes, "assettypeid", "name")) @html.validationmessagefor(model => model.asset.fkassettypeid)

the model code:

[display(resourcetype = typeof(i18n_asset), name = "label_asset_fkassettypeid")] public int fkassettypeid { get; set; }

anybody have experience issue, , know way prepare this? give thanks help.

i have found problem was, using jquery tabs on same page. caused frontsize of dropdownlistfor-s not scale css set whole site. instead renders dropdownboxfor frontsize of jquery tabs , sets frontsize css.

i have solved issue using javascript set font-size in document.ready function:

// ie9 causes bug dropdownlists not displayed correctly because won't adapt current font-size // javascript fixes resetting font-size if (window.navigator.systemlanguage && (!document.documentmode || document.documentmode === 9)) { //check if ie9 beingness used var list = document.getelementsbytagname('select'); // dropdownlists (i = 0; < list.length; i++) { list[i].style.fontsize = list[i].style.fontsize; // reset font-size } }

asp.net-mvc-3 internet-explorer-9 html.dropdownlistfor

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -