Forum
19:54
11/08/2014
Hi,
I have a jqgrid having textarea as columns which will contain multiple lines. I am using the edit option which when clicked opens the Edit Record popup. The issue that i face is when i enter multi-line characters in the popup and click on submit, the grid displays the text in one line. This issue is with IE8 only for me. Firefox works fine.
Â
Below is the sample code i have written:
Â
var mystr = "<?xml version='1.0' encoding='utf-8'?> <toolinfo> <rows>"+
"<row><cell>1
0
2</cell><cell>issue</cell><cell></cell><cell>A
B
C</cell><cell></cell><cell></cell></row>"+
"<row><cell>2</cell><cell>issue</cell><cell></cell><cell></cell><cell></cell><cell></cell></row>"+
"</rows></toolinfo>";
jQuery("#IssueResolutionList").jqGrid({
url:'editing.php?q=1',
datatype: "xmlstring",
datastr: mystr,
colNames:['Issue','Issue Modified On','Issue Modified By','Resolution','Resolution Modified On','Resolution Modified By'],
colModel:[{name:'issue',index:'issue', autoencode:false, editable: true, align: "left",edittype: "textarea",unformat: unfrmttextarea,editoptions:{rows:'8',cols:'75'}},
{name:'issuemodon',index:'issuemodon', editable: false,align: "left",sorttype : "date"},
{name:'issuemodby',index:'issuemodby', editable: false,align: "left",sorttype : "text"},
{name:'resol',index:'resol', editable: true,align: "left", edittype: "textarea",unformat: unfrmttextarea,editoptions:{rows:'8',cols:'75'}},
{name:'resolmodon',index:'resolmodon', editable: false,align: "left",sorttype : "date"},
{name:'resolmodby',index:'resolmodby', editable: false,align: "left",sorttype : "text"}],
rowNum:10,
rowList:[10,20,30],
pager: '#IssueResolutionPager',
sortname: 'issue',
viewrecords: true,
sortorder: "issue",
multiselect: true,
editurl:"someurl.php",
headertitles:true,
caption:"Issues and Resolutions",
loadComplete: function () {
$("tr.jqgrow:odd").addClass("odd-row-class");
$("tr.jqgrow:even").addClass("even-row-class");
}
});
function unfrmttextarea (cellvalue, options, cellobject) {
return cellvalue;
}
jQuery("#IssueResolutionList").jqGrid('navButtonAdd','#IssueResolutionPager',{title:'Edit Issue and Resolution',caption:"Edit",buttonicon:"ui-icon-pencil", onClickButton: function() {
var gr = jQuery("#IssueResolutionList").jqGrid('getGridParam','selrow');
if( gr != null ) jQuery("#IssueResolutionList").jqGrid('editGridRow',gr,{reloadAfterSubmit:false});
else alert("Please Select Row");
}});
Â
Thanks.
Â
Thanks,
Arun
11:11
Moderators
30/10/2007
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.
Most Users Ever Online: 715
Currently Online:
33 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