I want to wrap the content inside jqGrid which will be in the below format
Input string
2013/05/28 10:54 - Default - Subject A Task added
Output String
2013/05/28 10:54 - Default
Subject A Task added
Below is the code where I give the content to be displayed on screen
jQuery("#message").jqGrid({
datatype : "local",
data : resultSet,
height :250,
width : 960,
sortable : false,
ignoreCase : true,
sortorder : "desc",
colNames : [''],
colModel : [ {
name : 'content',
index : 'content',
width : '10%',
align : 'center',
sortable : false,
search : false
}],
rowList:[10,20,30],
pager : '#pager',
rowNum : 10,
altRows : true,
altclass:"myclass",
viewrecords : true,
});
I tried nltobr
like this
loadComplete : function() {
for (var i = 0; i < resultSet.length; i++) {
resultSet[i].messageContent = nl2br(resultSet[i].messageContent);
}
}
That is not working.
Is there any way to wrap based on second hipen? I also want to bold the first line.