Hi Himanshu, I have tried the solution suggested , it worked fine too. But I observed having two tables to show the datagrid have one prime difficiency: When headers are shown in different table, it fixes the header/column-name width also , When we actually represent the data in to datagrid inside second table, the width of datagrid columns is different than the widht of column name. I mean the width of column name and width of column content are different and hence beneath the Nth column , it shows the data/content of N+1 coulmn.
Could you please suggest me any solution to this ? OR Can you please guide me how to implement pagiantion in Struts DataGrid? Regards -Mukul Himanshu Rathore wrote: > > Hi Mukul, > > Here is sample code. I had mentioned incorrect steps in my previous email. > > <table width="100%" border="0" cellpadding="0" cellspacing="0" > > <tr> > <td> > <table id="tableHeader" border="0" class="PRODGRID" cellspacing="1" > cellpadding="0" > > <tr> > <th class ="GRID" width="14%"><bean:message key="label1" /></th> > <th class ="GRID" width="27%"><bean:message key="label2" /></th> > </tr> > </table> > </td> > </tr> > <tr valign="top"> > <td valign="top" id="lyr_container" style ="height: 225px"> > <div class="layerScroll" id="lyrContent" style ="vertical-align: > top;height: 250px"> > <layout:datagrid property="gridData" styleClass="GRID" > model="datagrid" > selectionAllowed="false"> > <layout:datagridColumn width="15%" *title=""* property="name1"/> > <layout:datagridColumn width="28%" *title=""* property="name2"/> > </layout:datagrid> > </div> > </td> > </tr> > </table> > > In second table wherein you will display data, I have set *title = ""*. > > Hope this will solve your problem. > > On 6/9/08, mukul.object <[EMAIL PROTECTED]> wrote: >> >> >> Hello All, >> I am seeking for suggestions on how can we fix the header/column-names in >> Struts-Datagrid. >> >> In my jsp , I have implemented struts-datagrid and showing many rows at a >> time. >> While scrolling the page , the column-names/header of the datagrid also >> scroll up and down and do not remain visible to the user. >> >> Is there any way to fix the column-name/header to the top of datagrid? >> >> Kindly suggest any solution. >> >> Thanks >> -Mukul >> -- >> View this message in context: >> http://www.nabble.com/Help-required-on-Struts-Datagrid-tp17730148p17730148.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > > Regards, > Himanshu Rathore > > -- View this message in context: http://www.nabble.com/Help-required-on-Struts-Datagrid-tp17730148p17774885.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]