PDA

View Full Version : Row data in Grid Panel is displaying out of alignment



shadab.gaur1
12 Sep 2013, 11:18 PM
Hello All,

I am facing an strange issue while displaying an email data in row of grid panel. Somehow, the contents of messages are appearing out of alignment (red circled text) while it was suppose to appear below the text written "You can view the reports......".

It seems because of this bad, the values of "Status" and "Group_ID" also not appearing on proper place.


45790

Please help me out to resolve this issue.

I have tried increase/decrease width of column in ColumnModel but that didn't work.


Below is the code snippet-

Grid panel's code-

var gridLog = new Ext.grid.GridPanel({
region:'center',
layout:'fit',
id:'gridEmailLogsPanel-ID',
stripeRows : true,
//layout: 'fit',
//autoWidth: true,

ds: LogAlertList_Store, // ds = datastore

cm: LogAlertList_ColModel, // cm = column model
autoExpandColumn:"cmMESSAGE_01",
autoScroll:true ,
// autoHeight: true
height: 400,
bbar: ...............
................
});


// COLUMNMODEL code

var LogAlertList_ColModel = new Ext.grid.ColumnModel([
{
header: "Log ID",
width: 40,
sortable: true,
locked:false,
//hidden: true,
dataIndex: 'LOG_ID'
},
// log part
{
header: "Date Time",
width: 175,
sortable: true,
dataIndex: 'DATETIME',
renderer: Ext.util.Format.dateRenderer('D M d Y - H:i:s')
},
{
header: "Subject",
width: 100,
sortable: true,
dataIndex: 'SUBJECT'
},{
header: "Messaage",
width: 150,
sortable: true,
dataIndex: 'MESSAGE',
id: 'cmMESSAGE_01'
},{
header: "Status",
width: 60,
sortable: true ,
dataIndex: 'STATUS'
}
// Email Part
,{
header: "User Group ID",
width: 100,
sortable: true ,
dataIndex: 'USER_GROUP_ID'
}
):

One more thing wants to bring into your notice----

The contents of "message" column fetched from server are something like this ---

<p>DDS has generated discounts for [vfiupe] circle. Average discounts are as follows:</p><table border="1"><tr align="left"><th>Category</th><th>Average discount</th><th>Weighted average discount(MOU weight)</th></tr><tr><td>Elastic_low_PVC</td><td align="center">41</td><td align="center">0</td></tr><tr><td>Elastic_high_PVC</td><td align="center">25</td><td align="center">0</td></tr><tr><td>Inelastic</td><td align="center">29</td><td align="center">0</td></tr><tr><td>Circle</td><td align="center">0</td><td align="center">0</td></tr></table>You can view the reports by accessing the <a href="http://10.200.33.8.8181/ControlRoom.html">Control Room Link</a> and choosing the Report Viewer icon.<tr>Discounts should be approved by: [Wednesday 16:00 MST]</tr></p>To access Control room you should have login credentials and network connectivity with DDS server.</p><p><i>This is system generated email and does not need any reply.</i></p>

Means, HTML code.

Please help me out.

slemmon
16 Sep 2013, 11:49 AM
Your message body has a <tr>.. </tr> floating out there outside of the <table>.



<p>DDS has generated discounts for [vfiupe] circle. Average discounts are as follows:</p><table border="1"><tr align="left"><th>Category</th><th>Average discount</th><th>Weighted average discount(MOU weight)</th></tr><tr><td>Elastic_low_PVC</td><td align="center">41</td><td align="center">0</td></tr><tr><td>Elastic_high_PVC</td><td align="center">25</td><td align="center">0</td></tr><tr><td>Inelastic</td><td align="center">29</td><td align="center">0</td></tr><tr><td>Circle</td><td align="center">0</td><td align="center">0</td></tr></table>You can view the reports by accessing the <a href="http://10.200.33.8.8181/ControlRoom.html">Control Room Link</a> and choosing the Report Viewer icon.<tr>Discounts should be approved by: [Wednesday 16:00 MST]</tr></p>To access Control room you should have login credentials and network connectivity with DDS server.</p><p><i>This is system generated email and does not need any reply.</i></p>


That seems to be what's causing your issue.