Open GoogleCodeExporter opened 8 years ago
Inspecting the code here, I found out why it happens, and came up with an idea
to solve it.
While flexigrid generate the <div>s, for some reason, it doesnt set cDrag, if
the <table> is not visible. So what I did was to force navigation in the tab,
to make at least the header visible, then the mouse will interact when over the
head (but not in the normal rows, because the data won't be populated fast
enough, unless I delay the change a bit, what I dont want, to make the user to
wait more time for that search)
for (i=0; i<tabs.total; i++) {
div = '.'+tabs.table[i];
var colmodel =
$.ajax({
url : 'getcolmodel.php',
async: false,
data : 'id='+tabs.profile[i],
dataType : 'json'}).responseText;
var cmodel = eval(colmodel);
$(div).flexigrid({
url: 'profile_search.php?text='+Search+'&id_profile='+tabs.profile[i],
dataType: 'json',
colModel : cmodel,
searchitems : [
{display: 'Filter all fields', name : 'name', isdefault: true}
],
sortname: "id",
sortorder: "asc",
usepager: true,
title: tabs.title[i],
useRp: true,
rp: 50,
showTableToggleBtn: true,
width: $(window).width()-40,
height: $(window).height()-400,
singleSelect: true,
showToggleBtn: true
});
$('#gridtab').tabs( "select" , i); // Change the tab so flexigrid will be visible while its being rendered
}
$('#gridtab').tabs( "select" , 0); // back to the first tab
Original comment by Vormav...@gmail.com
on 27 Jul 2011 at 8:05
Original issue reported on code.google.com by
Vormav...@gmail.com
on 24 Jul 2011 at 2:36