In IE 7 the table styling and paging is not applied when the datatable is first loaded. If the show entries drop down is changed the style is applied with the correct paging. This works fine in IE 8.
Thanks for your code - I've just tried pasting it into an example in my testing framework and is seems to work no problem at all in IE7. The styles are loads as expected at the first draw. I can't actually think of anything that would cause them to only apply at the second draw. Do you have a link you could post showing this problem in action?
Sorry this is an Intranet application. It works fine when using the Ie8 Developer tool in Ie 7 mode. But still got the problem from any Ie 7 browser. There is an error displayed, in IE7 but not in IE8:
Line : 2571, char : 5, error : Number Expected, Code : 0.
Also MvcContrib.UI.Grid is used, could this cause an issue with IE 7?
If I view the same page in Firefox 3, the formatting and paging works, but the table is moved 50% to the right and up so the headings are at the same level as the search box.
Regarding the 'Number expected' error - if you updated to the latest beta of DataTables 1.5 then this should go away (unless you are overriding the automatically detected data types...).
Regarding the display issue - it sounds like it's just a CSS issue. You might need to add a clear:both to the table's wrapper div. Firebug should be able to help you out here for fiddling with the CSS.
Regarding the IE7 not showing styles - that is really weird. I haven't been able to reproduce this on IE7 at all. Are you able to make a cut down example which shows this problem?
Replies
Do you have an example of this happening? IE7 works fine for me on the examples on this site.
Allan
var oTable;
$(document).ready(function() {
oTable = $('#enquiries').dataTable({
"aoColumns": [
{ "bSortable": true, "bSearchable": true, "sType": "numeric" },
{ "bSortable": true, "bSearchable": true },
{ "bSortable": true, "bSearchable": true },
{ "bSortable": true, "bSearchable": true },
{ "bSortable": true, "bSearchable": true },
{ "bSortable": true, "bSearchable": false}],
"aaSorting": [[0, "desc"]]
});
});
$('#enquiries').keyup(function() {
oTable.fnFilter(this.value, 0, false);
});
Cheers
Danny
Thanks for your code - I've just tried pasting it into an example in my testing framework and is seems to work no problem at all in IE7. The styles are loads as expected at the first draw. I can't actually think of anything that would cause them to only apply at the second draw. Do you have a link you could post showing this problem in action?
Thanks,
Allan
Line : 2571, char : 5, error : Number Expected, Code : 0.
Also MvcContrib.UI.Grid is used, could this cause an issue with IE 7?
<%
Html.Grid((List)ViewData["Tests"])
.Columns(column =>
{
column.For(c => c.TestID).Named("ID").Action(a => {%>
<%= Html.ActionLink(("ID" + a.testID.ToString()), "../Test/Details", new { id = a.TestID })%>
<%
});
column.For(c => c.A);
column.For(c => c.B);
column.For(c => c.C);
column.For(c => c.D);
column.For(c => c.E);
}).Attributes(id => "enquiries") .Render();
%>
Cheers
Danny
Cheers
Danny
Regarding the 'Number expected' error - if you updated to the latest beta of DataTables 1.5 then this should go away (unless you are overriding the automatically detected data types...).
Regarding the display issue - it sounds like it's just a CSS issue. You might need to add a clear:both to the table's wrapper div. Firebug should be able to help you out here for fiddling with the CSS.
Regarding the IE7 not showing styles - that is really weird. I haven't been able to reproduce this on IE7 at all. Are you able to make a cut down example which shows this problem?
Thanks
Allan