Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Drag and Drop shifts grid columns alignment
20/05/2009
23:30
Avatar
prbabu
Member
Members
Forum Posts: 22
Member Since:
11/05/2009
sp_UserOfflineSmall Offline

Hi,

Wondering, is anyone having a similar issue when doing a drag and drop of rows within the grid.  Please have a look at the screen-shot below on what I am referring to:

http://picasaweb.google.com.au.....2840046178

This happens only when you drag a row to the topmost position of the grid - both IE 7.0 and FF 3.0.

Any help and guidance suggested.

-Praveen

22/05/2009
15:38
Avatar
unintention
New Member
Members
Forum Posts: 1
Member Since:
22/05/2009
sp_UserOfflineSmall Offline

I've noticed this since 3.5 alfa.  Inspecting the rows in Firebug, I noticed that only the cells in the first row are getting their widths set by jqGrid, so when the first row is moved (or bumped out of first position), it no longer sets the widths for the entire columns. I simply removed “table-layout: fixed;” from my custom styles and that works for me…for now…

24/05/2009
19:24
Avatar
prbabu
Member
Members
Forum Posts: 22
Member Since:
11/05/2009
sp_UserOfflineSmall Offline

Thanks for your response!

I tried the suggestion, which is I believe commenting off the below line of code in the "ui.grid.css"

.ui-jqgrid .ui-jqgrid-btable {table-layout:fixed;}

The drag and drop seems to be fine, but unfortunately the grid column rendering is not in line with the header, even after commenting off the below line in the same CSS file:

.ui-jqgrid .ui-jqgrid-htable {table-layout:fixed;}

-Praveen

24/05/2009
21:20
Avatar
prbabu
Member
Members
Forum Posts: 22
Member Since:
11/05/2009
sp_UserOfflineSmall Offline

In the recent 3.5.beta release there is a new method called:

jQuery(”#mygrid”).updateColumns();

which I believe will sort this issue, if I am right in my understanding.

Need to confirm with Tony.

But when I try to use this method in "gridComplete" event like that of the below:
                gridComplete: function() {
                jQuery('#list').tableDnDUpdate();
                jQuery('#list').updateColumns();
                }
I get a message saying that "
updateColumns()" is undefined. This is happening in IE 7.0 and I am using the
latest source code from GitHub.
Appreciate your response on this Tony.

Regards,
Praveen

25/05/2009
01:31
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

You should use this method in the tablednd when the drag and drop ends. Also see the docs for the tablednd.

Something like if the new column is draged apply updateColumns

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.

28/05/2009
21:25
Avatar
prbabu
Member
Members
Forum Posts: 22
Member Since:
11/05/2009
sp_UserOfflineSmall Offline

The updateColumns() needs to be used like that off below:

var mygrid= jQuery(”#list”)[0];
mygrid.updateColumns();

-Praveen

23/09/2009
07:06
Avatar
KusTov
Israel
Member
Members
Forum Posts: 15
Member Since:
12/08/2009
sp_UserOfflineSmall Offline

Hi

I fixed the problem this way:

jQuery("#mygrid").tableDnD({
      onDrop: function(table, row) { jQuery("#mygrid")[0].updateColumns();}
});

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
60 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information