PDA

View Full Version : Style attribute of text input field for ygrid-page-number



maurits
1 Oct 2006, 5:42 AM
Hi Jack!

As I said before, I am absolutely thrilled with your grid, and really happy that someone is extending the YUI to build this.

I would like to make a request. Currently you have used the style attribute of the page number input text field to set its height. Would it be possible to do this using the grid.css file?

I don't know why it was set using the style attribute, but if there is no good reason to keep it there could you consider putting it in the css file?

I personally made the change myself in the code, but would appreciate not having to change the code for this every time I download a new version.

Thanks,
Maurits

maurits
1 Oct 2006, 11:06 AM
:shock: My apologies for posting in the wrong place.

jack.slocum
1 Oct 2006, 1:32 PM
When I initially created the PagedGridView the field's height was set in CSS. The problem is it ends up with a different height in every browser and/or doc type due to default padding on the field. By setting it using this.field.setHeight(18); I get automatic box-model adjustments by YAHOO.ext.Element and the field is the same height in every browser.

If you wanted to modify the height outside of the grid code itself, after rendering your grid you can add something like this:

grid.getView().field.setHeight(18); // or whatever your desired height

This way you won't have to modify the code on every download.

maurits
2 Oct 2006, 12:51 AM
Thanks Jack,

I will put your suggestion to work immediately :D