I need to catch the event where the columns are resized. How do I do that?
Asked
Active
Viewed 935 times
1 Answers
0
It seems to me you should use resizeStop
event (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:events&s[]=resizeStop#list_of_events)
UPDATED:
After you resize a column header in the jqGrid it calls resizeStop
event. For example
jQuery('#list').jqGrid({
caption: 'My caption',
url: myUrl,
resizeStop: function (newwidth,index) {
alert('Column #' + index + ' has now size ' + newwidth + ' px');
},
// other jqGrid parameters
});

Oleg
- 220,925
- 34
- 403
- 798
-
I realise the problem for me is not so easily solve... You see, I need to wordwrap the td contents, and the only way I could do it was to wrapInner the contents for each grid td with a DIV and set a fix width on that DIV based on the column's header width. simply using break-word on TD does not wrap the contents of the TD (which has a fixed width) after I did that... col resize does not calculate the inner divs I've inserted. I can't imagine how I can calculate the correct widths for each inner div (n position, n+1 position, n-1 position).. massive calculations, which works sweet on the THs. – bcm Jun 08 '10 at 01:40
-
I had a go with the resizeStop (useful)... only to realise all the additional calculations needed for all the inner Div width I've inserted. – bcm Jun 08 '10 at 01:42
-
close to giving up on finding a wordwrap + resize column solution, which will work for both FF, IE7 and IE8 – bcm Jun 08 '10 at 01:42
-
posted related question at http://stackoverflow.com/questions/2994343/how-to-implement-wordwrap-on-jqgrid-which-works-on-ie7-ie8-and-ff – bcm Jun 08 '10 at 02:00