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 = “
“
0
2
B
C
“
“
jQuery(“#IssueResolutionList”).jqGrid({
url:’editing.php?q=1′,
datatype: “xmlstring”,
datastr: mystr,
colNames:,
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
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top