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_Related Related Topics sp_TopicIcon
Change column width onCellSelect
19/04/2011
14:23
Avatar
sibbim
Member
Members
Forum Posts: 7
Member Since:
08/09/2010
sp_UserOfflineSmall Offline

Hi everybody,

I need your help. I want to change the width of a column after I clicked on a cell. Why?

The grid shows "short" values and when I click on a cell, the edit mode will be started with drop down boxes showing the "long" value to make it more easy to the user to understand the value.

The following code changes already the column header - but leaves the rest of the column at the old width.

onCellSelect: function(rowid, iCol, cellcontent, e){

   colWidth = $( ".edit-cell select" ).css('width');

   $('#col_name').css("width", colWidth + "px");
           
   var colId = iCol-2;
   if (columnHeader[3][colId] == true) {
      $( ".edit-cell select" ).jec({useExistingOptions: true});
   }            
 },

I also found a function called...

setColWidth();

...but it doesn't work (maybe because I don't know how to use it)

I also analysed the jqgrid source for the resize-stop event and found:

$('table:first',this.bDiv).css("width",p.tblwidth+"px");
$('table:first',this.hDiv).css("width",p.tblwidth+"px");

But I don't know how to use it 🙁 Yes ok, I'm still a little bit new to jqgrid.

Thank you very much for your help.

Sebastian

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
44 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