Hi Mukul, Sorry for late response. Hadn't seen your query. Well this option do have a drawback wherein the header table width differs from data table width. But problem is this is the only solution I have come across so far. Also not much help is available on net. You have to fix the data table widths so that both the headers and data are in-sync. I had to do a bit of hit-n-trial before I was able to match the tables' width.
Also I have never tried pagination in grid. I need to do a sample program before I can say anything. But one suggestion regarding this pagination thing. If you are doing client-side (JavaScript) validation, say the ID shouldn't be duplicated then don't know how this JavaScript validation will behave in case your Ids are on different pages. Just b/w you n me, I convinced my client about dropping the idea of having pagination on grid. May be you can also try the same :). But I know client can be stubborn sometime. Let me know if I could help you in resolving your problem. Regards, Himanshu Rathore -----Original Message----- From: mukul.object [mailto:[EMAIL PROTECTED] Sent: 11 June 2008 16:27 To: user@struts.apache.org Subject: Re: Help required on Struts-Datagrid 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.h tml >> 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.h tml Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]