Can anyone figure out what's wrong in the below code ??

29 views
Skip to first unread message

rohitszone

unread,
Feb 10, 2012, 5:27:27 AM2/10/12
to Flexigrid for jQuery
I am trying to get the flexigrid loaded, using the following code
using scriptlet..
code is
<table id=“flexme1”>
<thead>
<tr>
<%for(int i=0;i<displayColumnNamesList.size();i++) {%>
<th width="100%">
<%=displayColumnNamesList.get(i).toString().trim()%>
</th>
<%}%>
</tr>
</thead>
<tbody>
<%
for(int i=0;i<resList.size();i++){
EtassTradesVO etassTradesVO=(EtassTradesVO)resList.get(i);%>
<tr>
<%for(int j=0;j<columnList.size();j++){%>
<td width="100%">
<%=etassTradesVO.getAttribute(columnList.get(j).toString().trim())%>
</td>
<%}%>
</tr>
<%}%>
</tbody>
</table>

which generated the code as follows,
<table id=“flexme1”>
<thead>
<tr>
<th width=“100%”>FO Trade No</th>
<th width=“100%”>Version</th>
<th width=“100%”>Original Trade No</th>
<th width=“100%”>eTass Status</th>
<th width=“100%”>Trade Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>644132</td>
<td>1161</td>
<td>0</td>
<td>Error</td>
<td> </td>
</tr>
<tr>
<td>644132</td>
<td>1169</td>
<td>0</td>
<td>Error</td>
<td> </td>
</tr>
</tbody>
</table>

But the output as a grid is not as expected the table data is not
arranged inline with table header and the resizing doesn work..can
anyone help on this quickly ??
Many Thanks in Advance!!

Marc Ferrari

unread,
Feb 13, 2012, 2:02:05 PM2/13/12
to Flexigrid for jQuery
To make the grid behave as expected, be sure to strip out all of your
size declarations: width="100%" etc and do all of your sizing in your
config class you assign to the table in question. Then it will work
just fine.

If you still need assistance, I can post a snipped of code to show you
how I implement this kick ass grid using Microsoft SQL Server 2005 as
a data provider and .asp. There is already a php implementation around
the forum somewhere you can also refer to.

Cheers,

Marc
Reply all
Reply to author
Forward
0 new messages