Forum
13:11
10/08/2009
Hello Tonny!
New Column Reordering is very nice, but it works incorrect with master/detail grids:
Before columns reordering master/detail grids looked like
after reordering columns "Name" and "Testtiefe" in the master grid we receive a vary strange picture:
If we remove detail grid (comment the corresponding code), everything will be works fine:
The same problem I have in all my master/detail grid pages. All pages with one grid works correct. So I think, to reproduce the problem you can add "sortable: true" in any your master/detail grid example.
Best regards
Oleg
03:23
Moderators
30/10/2007
Hello Oleg,
Thanks. Will certainly test this behaviour.
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
03:30
Moderators
30/10/2007
Oleg,
I have just tested this on the demo MasterDetail and Grid as SubGrid and everething work OK. Could you please provide me a link to the problem or just publish or send me the code.
Thanks.
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
14:10
10/08/2009
Hello Tony!
I reduced my code and made it working with local data only instead of json in the original:
<html>
<head>
...
<script type="text/javascript" src="Testclusters.js"></script>
</head>
<body>
...
<table id="list"></table>
<div id="pager"></div>
...
</body>
</html>
where Testclusters.js looks like following
jQuery(document).ready(function() {
jQuery('#list').jqGrid({
caption: 'Testclusters',
height: 'auto',
gridview: true,
rownumbers: true,
sortable: true,
datatype: 'local',
viewrecords: true,
pager: '#pager',
pgbuttons: false,
pginput: false,
rowNum: 10000,
colNames: ['Name', 'Testtiefe', 'RowVersion'],
colModel: [
{ name: 'Name', index: 'Name', width: 120, sortable: false, editable: true, editoptions: { size: 30} },
{ name: 'TesttiefeName', index: 'TesttiefeName', width: 180, sortable: false, search: false, editable: true, editoptions: { size: 25} },
{ name: 'RowVersion', index: 'RowVersion', width: 1, sortable: false, hidden: true, editable: true, editrules: { edithidden: false} }
]
});
var myData = [
{ Name: "VIA XP", TesttiefeName: "Alle SW-Produkte", RowVersion: "20FC31" },
{ Name: "KUBUS", TesttiefeName: "Alle SW-Produkte", RowVersion: "20FC32" }
];
for (var i = 0; i <= myData.length; i++)
jQuery("#list").addRowData(i + 1, myData[i]);
jQuery('#detail').jqGrid({
caption: 'Testclustersdetails',
height: 'auto',
gridview: true,
rownumbers: true,
sortable: true,
datatype: 'local',
pager: '#pagerdetail',
rowNum: 10000,
colNames: ['Businessprofil', 'Bereitstellungsform', 'RowVersion'],
colModel: [
{ name: 'BusinessprofilName', index: 'Profil', width: 150, editable: true, editoptions: { size: 30} },
{ name: 'BereitstellungsformName', index: 'Bereitstellungsform', width: 150, search: false, editable: true, editoptions: { size: 25} },
{ name: 'RowVersion', index: 'RowVersion', width: 1, hidden: true, editable: true, editrules: { edithidden: false} }
],
pgbuttons: false,
pginput: false
});
var myDetailData = [
{ BusinessprofilName: "ERGO PC KUBUS XP", BereitstellungsformName: "Fat Client", RowVersion: "20FC67" },
{ BusinessprofilName: "ERGO PC KUBUS XP", BereitstellungsformName: "Web", RowVersion: "20FC68" }
];
for (var j = 0; j <= myDetailData.length; j++)
jQuery("#detail").addRowData(j + 1, myDetailData[j]);
});
You can download the full HTML/CSS/JavaScript code with all dependend files from http://www.ok-soft-gmbh.com/ReorderColumnsError/ReorderColumnsError.zip
For the code of jqGrid 3.6 beta I used the code, which I just now loaded from http://github.com/tonytomov/jqGrid/tree/jqgrid36
Best regards
Oleg
01:20
Moderators
30/10/2007
Hello Oleg,
The fix is in GitHub. Thanks
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
13:21
Moderators
30/10/2007
Hello,
I can not reproduce this in my testing machine.
Could you please post the code or send me a link to the problem.
Or at last send me the code to my e-mail.
Thank you
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
00:11
02/11/2009
I am not able to insert the screenshots. If you can tell me your email address I will send the screenshots as a .odt document. I have tested this is Safari and Firefox and the results are the same. In Safari I noticed that the mismatch is happening on the 10th row. I don't know if this is a co-incidence. In Firefox it seems to be random.
The code for displaying the grid below:-
HTML Table:-
<table class=”display” id=”unitdems”>
<thead>
<tr>
<th>Unit Demand No</th>
<th>Part Number</th>
<th>Reason Demand</th>
<th>Demand Qty
</thead>
<tbody>
<% for unit_demand in @unit_demands %>
<tr>
<td><%=h unit_demand.unit_demand_no %></td>
<td><%=h unit_demand.part_number %></td>
<td><%=h unit_demand.reason_demand %></td>
<td><%=h unit_demand.qty_reqd %></td>
</tr>
<% end %>
</tbody>
</table>
<div id=”pager” class=”scroll” style=”text-align:center;”></div>
<p><%= link_to “New Unit Demand”, new_unit_demand_path %></p>
The data matches the column headers.
After this when re-ordering columns, the data and column headers are mismatched. This is the first block of code in the application.js file. The code in application.js is as follows:-
$(document).ready(function()
{
tableToGrid(”#unitdems”, {
sortable: true,
pager: $('#pager'),
//rowNum: 10,
//rowList: [10, 20, 30],
//sortorder: 'desc',
//viewrecords: true,
imgpath: 'public/images/ui',
forceFit: true,
loadtext: 'Loading…',
caption: 'Unit Demands'
});
Then when I re-order the columns randomly, they all fit together again, as shown below:-
The code for displaying the grid below:-
HTML Table:-
<table class=”display” id=”unitdems”>
<thead>
<tr>
<th>Unit Demand No</th>
<th>Part Number</th>
<th>Reason Demand</th>
<th>Demand Qty
</thead>
<tbody>
<% for unit_demand in @unit_demands %>
<tr>
<td><%=h unit_demand.unit_demand_no %></td>
<td><%=h unit_demand.part_number %></td>
<td><%=h unit_demand.reason_demand %></td>
<td><%=h unit_demand.qty_reqd %></td>
</tr>
<% end %>
</tbody>
</table>
<div id=”pager” class=”scroll” style=”text-align:center;”></div>
<p><%= link_to “New Unit Demand”, new_unit_demand_path %></p>
The data matches the column headers.
After this when re-ordering columns, the data and column headers are mismatched. This is the first block of code in the application.js file. The code in application.js is as follows:-
$(document).ready(function()
{
tableToGrid(”#unitdems”, {
sortable: true,
pager: $('#pager'),
//rowNum: 10,
//rowList: [10, 20, 30],
//sortorder: 'desc',
//viewrecords: true,
imgpath: 'public/images/ui',
forceFit: true,
loadtext: 'Loading…',
caption: 'Unit Demands'
});
Then when I re-order the columns randomly, they all fit together again.
Regards
04:39
Moderators
30/10/2007
Hello,
Thanks. I will check it.
Best Regsrds
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
09:51
I see the same issue in IE and Opera, but not in Firefox.
Select a column to the right of the jqgrid horizontal scrollbar (not visible until scrolled) and sort by it - header and data now mismatched. Mozilla in this scenario automatically scrolls grid to show its left side, but IE and Opera do not.
Is there a workaround?
Thank you!
03:30
Moderators
30/10/2007
Hello,
Thanks.I see this. Yes the behaviour is strange in FireFox too when we first resize the coumns so that horizontal scrollbar appear and when we try to sort column which is not visible - it is go to a bad position.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
82 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66