New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
w2ui 1.4.3. grid not displaying #1613
Comments
The grid expects data in the JSON format from the server as it is described below. The JSON structure will be merged into the grid with jQuery.extend method. It means that you can return any supported grid property from the server and it will be applied.
|
On a side note: even though this is still in the docs, this only applies to version 1.4 - w2ui 1.5 will no longer extend grid properties and only the following JSON properties are checked: |
Thank you |
@dregos can you please create a jsFiddle with the problem. |
Hi. Thank you for the insight. how do I add resource link to w2ui in jsFiddle? However.. I've used JSON stringify. And now I get "ERROR: Cannot add records without recid. ". I then added a column field with a name of "recid" but still the same. |
I've upgraded w2ui to w2ui-1.5.rc1.min. This is the fiddle I've prepared, but there are no resources jet. If you can help me with that. It would be great. -> https://jsfiddle.net/dregos/z3u1p6dw/ |
There you go: https://jsfiddle.net/z3u1p6dw/4/ |
Thank you mpf82.. I've done the same, but should have apparently put in the right one. Well Now that we have a working fiddle it shows the same error with recid. |
That's because you're converting your prefectly fine records (and columns) into a string:
You should also give the grid an absolute height in pixels instead of a relative height in percent: |
Ok I probably missed somewhere something. Because as I understood the problem was exactly that. That I passed an object instead of JSON string. |
Why don't the first column items render? |
Ok.. It seems the problem is in column property "render". |
@dregos Is your problem solved now? Can this issue be closed? |
Yes. It seems ok now. I’ve forgotten how I solved it but I think it is ok. |
I have a previous version of w2ui 1.4.3.
If i inspect the Grid is there but is hidden. I see it generates column headers but without values (captions). I wouldn't be asking but I am using the w2ui 1.4 grid in several projects and it works everywhere but here I can't figure out what is wrong I've been at it a couple of days now.. A have checked the objects(columns and rows) generated and everything but can't figure out the reason for such behaviour. I would really appreciate if you could take a look, or at least point me in direction in which to look.
Console log is clean and there aren't any js errors. Here you can see the data object I've printed.
Here you can see what is rendered on a web page
And here you can see the html element that is rendered,
w2ui rendered html result.html.txt
The text was updated successfully, but these errors were encountered: