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
TextArea not multi lines
10/09/2008
16:18
Avatar
brad8118
Member
Members
Forum Posts: 20
Member Since:
23/07/2008
sp_UserOfflineSmall Offline

Tony,

  I've defined a column to contain textarea elements. The text in the textarea elements is shortened according to the width of the column and has "..." appended to it.

Is there an "easy" way to force the textarea to be multiline when its not being edited.  When the text area is edited the textarea properly takes up 3 rows by 25 cols. ie edittype: "textarea", editoptions: { rows: "3", cols: "25"}

To get around this I created a new textarea element and set it for the column.

 var note = document.createElement("textarea");
$(note).attr({ id: "Notes", name: "Notes", rows: 3, cols: "27", readonly: "true" });
$(note).html(StatusNote);

 var row = { Edit: editImg, JobName: JobName, JobID: JobID, Customer: Customer, Lead: Lead, Status: Status, StatusList: Status, TM: TMCheckBox, Promised: promiseDate, Bid: Bid, DateChanged: DateChanged, Notes: $(note) };

$("#list").addRowData(i + 1, row);

Doing this works except that there are scroll bars on the text area.  Not a big deal.  The larger issue is now when I do a row edit I get the html of the element instead of only the text.  I ended up writing functions to extract the message from the html. 

I've read your docs, which are really good, and I don't think I missed anything.  I'm just wondering if I'm doing something wrong or missed something. 

Thanks Brad

12/09/2008
03:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Not tested, but you can try to use setCell method where you

can add a class which does not wrap the contents of the cell.

Your approch IMHO is not applicable.

first you create textarea and the you edit the created textarea again.

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/01/2009
11:31
Avatar
dhoover
Member
Members
Forum Posts: 23
Member Since:
28/12/2008
sp_UserOfflineSmall Offline

Actually, I like the behavior of long data from a textarea inthe columns, where it just shows what it can. I also found it nice that a "tooltip" with the full text pops up when I hover over that text. I would find it more useful however if the newlines in the data where retained in the tooltip popup.

Thanks.

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

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

Hello,

The upcoming release (I hope to publish a beta version for testing) will contain a custom formaters.

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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