Web Connection
wwWebDataGrid html issues
Gravatar is a globally recognized avatar based on your email address. wwWebDataGrid html issues
  Stein Goering
  All
  Sep 12, 2017 @ 10:14am

My web designer is complaining about the html of pages using the wwWebDataGrid control:

It puts the outdated cellpadding into the table tag: <table id="grdSearchLog" class="awTable" cellpadding="3" >

And puts the closing </tbody> tag in the wrong place. It should be above the <tfoot> tag.

I can fix the cellpadding by overriding the control property on the various templates and setting it to zero - tho it seems like that should be the default given that the attribute has been deprecated.

The tbody issue needs a code change. In the render method, move the line ahead of the RenderPager call:

lcOutput = lcOutput + [</tbody>] + CRLF  && moved this line 

IF this.PageSize > 0 AND this.PageCount > 0 
   lcOutput = lcOutput + this.RenderPager()
ENDIF

lcOutput = lcOutput + [</table>] + CRLF
Thanks.

--stein

Gravatar is a globally recognized avatar based on your email address. re: wwWebDataGrid html issues
  Rick Strahl
  Stein Goering
  Sep 12, 2017 @ 03:14pm

Thanks Stein,

Moved.

As to the cell padding. Well, the code is now 10+ years old so there's quite a bit of legacy styling in there and the padding is sort of required for the old style sheets to work properly. Now it can be fixed I suppose but at this point not going to happen ?? Setting the value expliictly to 0 should do the trick though.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: wwWebDataGrid html issues
  Stein Goering
  Rick Strahl
  Sep 12, 2017 @ 06:56pm

Good point - you need to maintain backwards compatibility so as not to mess up existing pages. Easy enough to to override if that's what you want.

© 1996-2017