Skip to content
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

Rows and table too wide #118

Closed
rodolpheh opened this issue May 21, 2013 · 15 comments
Closed

Rows and table too wide #118

rodolpheh opened this issue May 21, 2013 · 15 comments

Comments

@rodolpheh
Copy link

Hi,

i've got two problems with the w2ui grid. I want to make a grid with expandables elements. See the picture attached to understand what i specifically want.

  1. As you can see, my rows are too wide and that make the end of them unreadable. It seems that the total width is too big, even with only one column set to 100%.
  2. When i expand my subgrids, some of my general records are hidden on the bottom of the grid. I want the grid to expand when subgrids are expanding but i can't seem to do it.

Is this a common problem or am i doing something wrong ?

Thanks for your work and your help.
capture

@vitmalina
Copy link
Owner

Acknowledged. I have had similar issue submitted today. I will be working on it this week. One thing that you can do it try to adjust size of the div given to you by expand function. It comes as box_id in your event.

@vitmalina
Copy link
Owner

I have played a bit more and I found

  1. If you do not set width to the box_id div, it will take correct width.
  2. Your second problem can be fixed if you use fixedBody = false. http://w2ui.com/web/docs/w2grid.fixedBody

I hope it helps.

@rodolpheh
Copy link
Author

I tried your advices but nothing is working. Thanks for taking some of your time for this. fixedBody is already set to false for all of my grids and no width is set. Should i remove also height properties ?

@vitmalina
Copy link
Owner

With fixedBody the height should not be set. Also try to call grid.resizeRecords() (and possibly grid.resizeBoxes() before it)

@rodolpheh
Copy link
Author

After trying grid.resizeRecords() and grid.resizeBoxes in various cases, i was not able to achieve what I want to do. How should I use them properly ? When I use them, the row isn't expanding but some blank appear above. Removing the height doesn't solve the problem either.

vitmalina added a commit that referenced this issue May 23, 2013
…size

Fixes issue #118 - now the width should be pixel perfect.
@vitmalina
Copy link
Owner

I have re-worked grid's width distribution. Download latest from src/w2ui.js. It should be pixel perfect regardless of width of any columns. Let me know if it worked or didn't

@rodolpheh
Copy link
Author

I tried the last w2ui.js from the js directory (there isn't any src/w2ui.js file). There is one grid in which the column size is correct. For the other, the columns are shifted (because of the expand column i think) and some of my 100%-wide columns are not 100% wide. See attached picture.

I also have some sort of grey padding in the bottom of forms when they are in a popup, just below the save and clear buttons.

EDIT: As you can see, one of my grid is ignoring columnHeaders = false.
When I expand the "freespace results" or "materials results" row, firebug says:
TypeError: obj.columns[ind] is undefined
for the w2ui.js at line 2120. Hope that helps!
captures

@vitmalina
Copy link
Owner

you also need updated css

@rodolpheh
Copy link
Author

It's perfect except for freespace results which show nothing on first opening and is too wide on second opening. The form in the popup still have grey padding below the buttons. See picture attached.

On expand, firebug says:
TypeError: obj.columns[ind] is undefined
and
ReferenceError: grid_keydown is not defined
for the line 2120 in w2ui.js

EDIT: also, in the master grid, all my data are vertically centered except for the second column. You can see it on the picture i posted in my previous message.
captures

@vitmalina
Copy link
Owner

  1. I cannot replicate error
  2. The reason one column is not vertically aligned is because it is probably an editable column. Then alignment is inside the control.
  3. Fixed, problem with form. Will commit today.

@vitmalina
Copy link
Owner

I think I fixed error #1. Please download the latest.

@rodolpheh
Copy link
Author

It's weird. Some problems remains: when I open freespace results, only one column is visible. But, if I open firefox console when freespace results are expanded, every columns are visibles. Materials results are fine.

My titles (eg. "Freespaces results" and "materials results") aren't using 100% width except when I open a subgrid. I'll try to play with resizeBoxes and resizeRecords but for the moment, nothing is working. It likes there is problems when it comes to calculate width and display for subgrids.

Also, it looks like show.columnHeaders it's broken. They're always visible, even if i put show.columnHeaders to false.

If you want more information about my code or others, do not hesitate to ask me.

EDIT: None of my columns are set as editable, why my first column is considered as editable ?

@vitmalina
Copy link
Owner

Please email me entire code for analysis. I am not sure I understand what is wrong.

About show.solumHeaders - there was a bug that was fixe yesterday in latest checkin.

@dhanyaa
Copy link

dhanyaa commented Jul 16, 2014

Hi Vitamalina,
Please tell me how to add hyper links to the column values , which takes me to another page
Thanks in advance

@vitmalina
Copy link
Owner

replied in #580

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants