I’ve come across something odd with the MVCContrib Grid. Using Chrome (or FireFox), when I go to a certain view that uses the MVCContrib Grid, I get the expected results (multiple rows of data). However, on the same exact page in IE, I’m only getting a single row (the first in the set).
When I inspect the generated html on both sides, Chrome has all the rows, but IE only has it’s one.
Here is a list of the dependencies in the project: Fluent NHibernate, Castle Windsor, MvcContrib, JQuery 1.5.1., JQuery UI, jquery-address, jquery-multiselect
Can anyone make any sense of this? This is the view in question.
<div id="fileList">
@Html.Grid(Model).Columns(column => {
column.For(x => Html.ActionLink(x.Id.ToString(), "FileDetails", new { id = x.Id })).Named("File ID");
column.For(x => x.Client.Name);
column.For(x => x.Status);
column.For(x => x.ProcessDate);
column.For(x => x.TestMode);
}).Attributes(Style => "text-align: center", @Class => "linkGrid").RowAttributes(data => new MvcContrib.Hash(onclick => String.Format("location.href='{0}';", Url.Action("FileDetails", new { id = data.Item.Id }))))
@Html.AjaxPager(Model, new PagerOptions() { PageIndexParameterName="page", ShowDisabledPagerItems = false, AlwaysShowFirstLastPageNumber=true },
new AjaxOptions() { UpdateTargetId = "fileList" })
</div>
New Find:
Sometimes, when I refresh the view in IE, I get Giberish back in the grid. What was interesting is that the giberish changes. Sometimes I’ll get bits and pieces of garbled javascript, and I even got some giberish about some of the networking hardware on the machine. I only started getting the giberish when I upgraded to IE9 (hoping that would fix the problem). Again this only happens in IE, Chrome and FireFox work perfectly.
This is an example of the giberish I see:
“䱾寵釚䕽뾀㘳흷ᛣIntel(R) 82567LM Gigabit Network Connection-QoS Packet Scheduler-0000렭蕄��ᇟ₧돨ӘIntel(R) 82567LM Gigabit Network Connection-WFP LightWeight Filter-0000렮蕄��ᇟ₧돨Ә “WAN Miniport (IP)擭Ⲫ몣䑳㞶웞ᑚpWAN Miniport (Network Monitor)-QoS Packet Scheduler-0000葮瀹ᇞᴀ降ᱚ VIntel(R) 82567LM Gigabit Network Connection뿊ﯩ橙䅴꺝榮퀏蜒VWAN Miniport (IP)-QoS Packet Scheduler-0000葮瀹ᇞᴀ降ᱚZWAN Miniport (IPv6)-QoS Packet Scheduler-0000葮瀹ᇞᴀ降ᱚ(WAN Miniport (PPPOE)ᩒ踰꿺佉쪹郇ꆖ嚠 “RAS Async Adapter⭾砃䥨䋓㞟縨沨ꨊ:Software Loopback Interface 1葮瀹ᇞ満湯捩 BDell Wireless 1397 WLAN Mini-CardG��⋂籶䓇춤䦥篸苊 Dell Wireless 1397 WLAN Mini-Card-Virtual WiFi Filter Driver-0000G렱蕄��ᇟ₧돨Ә vDell Wireless 1397 WLAN Mini-Card-QoS Packet Scheduler-0000G렯蕄��ᇟ₧돨Ә Dell Wireless 1397 WLAN Mini-Card-Native WiFi Filter Driver-0000G쾥แ��ᇟᎅ採풩 zDell Wireless 1397 WLAN Mini-Card-WFP LightWeight Filter-0000G렰蕄��ᇟ₧돨Ә NMicrosoft Virtual WiFi Miniport AdapterG⋰ꞑૡ䰌侎ᚊց Microsoft Virtual WiFi Miniport Adapter-Native WiFi Filter Driver-0000G⋳Ӊ⤐ᇠ䚖☀릹 Microsoft Virtual WiFi Miniport Adapter-QoS Packet Scheduler-0000G⋴Ӊ⤐ᇠ䚖☀릹 Microsoft Virtual WiFi Miniport Adapter-WFP LightWeight Filter-0000G⋵Ӊ⤐ᇠ䚖☀릹 &WAN Miniport (SSTP)韗燸䶍��肬��瀢 (WAN Miniport (IKEv2)覠耣鰚䰨馐羼逪᫃ &WAN Miniport (L2TP)麫䘦助摆뮟骓 &WAN Miniport (PPTP)鴬��蝂亱·闓ᣄ㌿ 0Microsoft ISATAP Adapter㳳竹눞䔢꺩뺨ン螅 BTeredo Tunneling Pseudo-Interface횀ꎘ忈䊓咚㨎됥釙6Microsoft ISATAP Adapter #2ⴼꦡ덁䟩㖷첵崰6Microsoft ISATAP Adapter #3萖ᅴ൸䲖ẓ��᧶6Microsoft ISATAP Adapter #4ᝲ⪤蒉䄎꾍ꝟ䫺”
After a nice debugging session we had in the comments section it seems that the problem is caused by the
Statuscolumn on the model which is of typecharand the problem appear when the value is 0. So one possible solution is to check if the value of the column is 0 and replace with an empty space instead.