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
jqGrid Edit Popup
11/08/2014
19:54
Avatar
arun16Oct
New Member
Members
Forum Posts: 1
Member Since:
11/08/2014
sp_UserOfflineSmall Offline

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

18/08/2014
11:11
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

 

You may find the answer here

 

Regards

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:
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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information