Forum
00:21
27/06/2013
I am new to web programming.
I am using jqGrid. I have the grid functioning and have an add dialog working.
I would like to change some of the attributes of the elements on the modal dialog.
For instance: I have a text box for a description field. I would like this box to show up with multiple lines and wrap the data.
From my research I think that there is probably an editoption that would accomplish this but the documentation on editoptions does not appear to be complete.
The documentation says:
In this case you can set any other valid attribute for the editable element. For example, if the element is edittype:'text', we can set size, maxlength, etc. attributes. Refer to the valid attributes for the element
but I can't seem to find documentation on what the valid attributes are for the element type textbox.
I have been able to change the width using the size attribute. I have tried using height as an attribute but that doesn't work.
Any help would be greatly appreciated.
21:00
27/06/2013
I figured it out!
To make it multiline use the edittype textarea, set the number of rows in the editoptions.
To change the width of the textarea, set the number of columns (cols) in the editoptions.
$grid->setColProperty("RiskDescr", array("label"=>"Risk Description", "width"=>235, "edittype"=>"textarea", "editoptions"=>array("rows"=>5, "cols"=>100, "placeholder"=>"– Enter a Risk Description –"), "editrules"=>array("required"=>true), "searchoptions"=>array("sopt"=>array("cn"))));
Most Users Ever Online: 715
Currently Online:
45 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