Subfile grid resizing columns
-
- Profound User
- Posts: 91
- Joined: Fri Aug 03, 2012 11:07 am
- First Name: Paul
- Last Name: Ramcharitar
- Company Name: Banks DIH
- City: Georgetown
- Zip / Postal Code: 592
- Country: Guyana
- Contact:
Subfile grid resizing columns
I'm trying to dynamically resize my subfile from it's initial set of widths. I used the methods below and the subfile did resize, but the css got messed up. The background of the rows go missing after it crosses the added width that i set.
getObj("Pre-Grid").grid.setProperty("width", 700);
getObj("Pre-Grid").grid.setProperty("column widths", "305,100,100,190,5");
getObj("Pre-Grid").grid.setProperty("width", 700);
getObj("Pre-Grid").grid.setProperty("column widths", "305,100,100,190,5");
- Alex
- Profound Logic Staff Member
- Posts: 233
- Joined: Fri Jan 04, 2008 12:10 pm
- First Name: Alex
- Last Name: Roytman
- Company Name: Profound Logic Software
- Contact:
Re: Subfile grid resizing columns
Hi Paul,
Setting the "width" and "column widths" properties does not automatically cause re-rendering of the grid. We will be adding a special method to allow the grid to re-render in the next release. However, for now, as a workaround, just add the following line of code after setting the properties.
getObj("Pre-Grid").grid.setNumberOfRows(7);
Instead of 7, use the number of rows (including the header) that your grid actually has. I know there is no need to set the number of rows, but this will cause the grid to re-render, which is what you want.
I hope this helps.
Setting the "width" and "column widths" properties does not automatically cause re-rendering of the grid. We will be adding a special method to allow the grid to re-render in the next release. However, for now, as a workaround, just add the following line of code after setting the properties.
getObj("Pre-Grid").grid.setNumberOfRows(7);
Instead of 7, use the number of rows (including the header) that your grid actually has. I know there is no need to set the number of rows, but this will cause the grid to re-render, which is what you want.
I hope this helps.
-
- Profound User
- Posts: 91
- Joined: Fri Aug 03, 2012 11:07 am
- First Name: Paul
- Last Name: Ramcharitar
- Company Name: Banks DIH
- City: Georgetown
- Zip / Postal Code: 592
- Country: Guyana
- Contact:
Re: Subfile grid resizing columns
Thanks a lot Alex. The workaround did the trick
-
- Profound User
- Posts: 91
- Joined: Fri Aug 03, 2012 11:07 am
- First Name: Paul
- Last Name: Ramcharitar
- Company Name: Banks DIH
- City: Georgetown
- Zip / Postal Code: 592
- Country: Guyana
- Contact:
Re: Subfile grid resizing columns
Hi Alex, I have encountered a problem after using "setNumberOfRows".
I have this property, "onrowclick" set to "pui.click("viewLink." + row)". What this basically does is, go to another screen when a specific row in the subfile is clicked. ("viewLink." + row) is the ID of a link in the subfile row.
Now when I click on a row, it shows that a response is being sent, but it doesn't go to the next screen any more.
I have this property, "onrowclick" set to "pui.click("viewLink." + row)". What this basically does is, go to another screen when a specific row in the subfile is clicked. ("viewLink." + row) is the ID of a link in the subfile row.
Now when I click on a row, it shows that a response is being sent, but it doesn't go to the next screen any more.
-
- Profound User
- Posts: 82
- Joined: Fri Jun 29, 2012 2:33 pm
- First Name: Antonio
- Last Name: Ruballos
- Company Name: Profound Logic
- Contact:
Re: Subfile grid resizing columns
Hello Paul,
May I ask what browser you are currently using?
May I ask what browser you are currently using?
-
- Profound User
- Posts: 91
- Joined: Fri Aug 03, 2012 11:07 am
- First Name: Paul
- Last Name: Ramcharitar
- Company Name: Banks DIH
- City: Georgetown
- Zip / Postal Code: 592
- Country: Guyana
- Contact:
Re: Subfile grid resizing columns
Hi Antonio, I'm running in it Phonegap. The device is a Thinkpad tablet, with Android 3.0
-
- Profound User
- Posts: 82
- Joined: Fri Jun 29, 2012 2:33 pm
- First Name: Antonio
- Last Name: Ruballos
- Company Name: Profound Logic
- Contact:
Re: Subfile grid resizing columns
Paul,
Could you send me the dds for the screens you are having issues with? And if its possible maybe the rpg code as well. I can begin debugging it then.
Could you send me the dds for the screens you are having issues with? And if its possible maybe the rpg code as well. I can begin debugging it then.
-
- Profound User
- Posts: 91
- Joined: Fri Aug 03, 2012 11:07 am
- First Name: Paul
- Last Name: Ramcharitar
- Company Name: Banks DIH
- City: Georgetown
- Zip / Postal Code: 592
- Country: Guyana
- Contact:
Re: Subfile grid resizing columns
I wont be able to give you the code or dds, but I can give you the tutorial that I followed to achieve what I wanted.
http://www.profoundlogic.com/docs/displ ... ubfile+Row.
Everything was working until I used the "setNumberOfRows" method.
http://www.profoundlogic.com/docs/displ ... ubfile+Row.
Everything was working until I used the "setNumberOfRows" method.
- Alex
- Profound Logic Staff Member
- Posts: 233
- Joined: Fri Jan 04, 2008 12:10 pm
- First Name: Alex
- Last Name: Roytman
- Company Name: Profound Logic Software
- Contact:
Re: Subfile grid resizing columns
We just published a new version (4.1.2). The grids now have a new .render() method that you should use instead. See here: http://www.profoundlogic.com/docs/displ ... nder%28%29
I believe this will solve your problem.
I believe this will solve your problem.
-
- Profound User
- Posts: 91
- Joined: Fri Aug 03, 2012 11:07 am
- First Name: Paul
- Last Name: Ramcharitar
- Company Name: Banks DIH
- City: Georgetown
- Zip / Postal Code: 592
- Country: Guyana
- Contact:
Re: Subfile grid resizing columns
Hi Alex,
The .render() method worked. Thanks!
However I had to use "getObj("Grid1").grid.render();" instead of "getObj("Grid1").render();" as stated in the documentation: http://www.profoundlogic.com/docs/displ ... nder%28%29
The .render() method worked. Thanks!
However I had to use "getObj("Grid1").grid.render();" instead of "getObj("Grid1").render();" as stated in the documentation: http://www.profoundlogic.com/docs/displ ... nder%28%29
Who is online
Users browsing this forum: No registered users and 4 guests