Closed fiSCIENCES closed 3 months ago
This is out of the scope of the GridView - you have to take care of it by yourself by using css / javascript - everything you need is already available with headerOptions like you mentioned.
Hi @bizley,
If you set up a header, a text field or a drop-down list (etc.), GridView use them top calculate the auto width minimum. But if you set up a placeholder, it does not! I disagree with you. Should be consistent.
Thank you.
Hm, I'm confused, is GridView adding any code to set this auto width minimum?
No, I use this minimum to prevent GridView column width from being calculated under the width of the placeholder. Because GridView DataColumn auto calculated the width of each column, but forgot to check with the placeholder.
Please explain this "Because GridView DataColumn auto calculated the width of each column".
Sorry, my English seem not enough.
When you create a GridView, you don't specify column width. DataColum will set them base on string length for each column. So when you use another screen size, column width are automatically recalculated from space available.
Thank you.
AFAIK GridView
does not specify columns width in any way. It just generates <table>
and it is browser responsibility to render it in most optimal way. If you think that it is not optimal, you can either report it as bug in browser, or create an extension that would calculate widths using JS and overwrite browser behavior.
OK, so there is definitely something I'm missing in the base core here. I will look further at it.
Thank you.
Hello,
It's my first report, so excuse me if not done in the perfect manner.
Here my code:
So I add a placeholder text, but it is larger than the rest. So I need to specify the width with this code:
But it could be an issue with different devices, screen size...
Would be great if it could include placeholder text width in auto width calculation.
Thank you.