-
1 Aug 2011 9:28 AM #191Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
If the columns are off, you probably are trying to fit long text in. Try using overflow hidden or get your Panel wider.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
1 Aug 2011 11:24 PM #192
word-wrap:break-word; solved the problem
word-wrap:break-word; solved the problem
Code:colTpl += '<td width="' + width + '%" class="x-grid-cell x-grid-hd-cell x-grid-col-' + col.mapping + ' ' + cls + '" mapping="' + col.mapping + '"><p style="overflow:hidden;width:' + width + 'px;word-wrap:break-word;text-align: center;">' + col.header + '</p></td>';
Long words cause this problem.Code:colTpl += '<td width="' + width + '%" class="x-grid-cell x-grid-col-' + col.mapping + ' ' + cls + ' {isDirty:this.isCellDirty(parent)}" style="' + style + '" mapping="' + col.mapping + '" rowIndex="{rowIndex}"><p style="overflow:hidden;width:' + width + 'px;word-wrap:break-word;text-align: center;">{' + col.mapping + '}</p></td>';
We have added "word-wrap:break-word;" to colTpl variable in buildHeader and buildDataView functions.
You could see assignments above.
Last edited by yitachi; 1 Aug 2011 at 11:26 PM. Reason: Format code blocks
-
2 Aug 2011 8:24 AM #193
I ended up doing something very similar. Otherwise any use of renderer methods that introduce HTML values would lead to problems with reloads.
If I had time, I think a better solution may be to move the renderer call into the colTpl template instead and reserve the prepareData method for the more standard usage in DataViews of adding new data to the record. Any opinion if that would be a mistake?
-
8 Aug 2011 3:59 PM #194
List Disclosure Icon Render Issue on Android
List Disclosure Icon Render Issue on Android
Hi all,
I am new to this forum and found this nice TouchGridPanel. I was trying to use it in my app but ran into problem with my list. When I select a list item, the disclosure icon becomes a solid square. If I commented out .x-item-selected in the Ext.ux.TouchGridPanel.css, then it renders fine. I can recreate this problem in both Android 3.1 and 2.2.1.
Here is a very simple demo code:
main.js:
index.html:Code:Ext.setup({ tabletStartupScreen: 'tablet_startup.png', phoneStartupScreen: 'phone_startup.png', icon: 'icon.png', glossOnIcon: false, onReady : function() { Ext.regModel('Contact', { fields: ['firstName', 'lastName'] }); Ext.regStore('Contact', { model: 'Contact', data: [ {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Jamie', lastName: 'Avins'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Dave', lastName: 'Kaneda'}, ] }); var list = new Ext.List({ fullscreen: true, store: 'Contact', fullscreen: true, itemTpl: '{firstName} {lastName}', onItemDisclosure: function(record) { } }); } });
Any workaround would be appreciated! Thanks in advance.Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Sencha Touch GridPanel</title> <link rel="stylesheet" href="../touch11/resources/css/sencha-touch.css" type="text/css"> <link rel="stylesheet" href="Ext.ux.TouchGridPanel.css" type="text/css"> <script type="text/javascript" src="../touch11/sencha-touch-debug.js"></script> <script type="text/javascript" src="Ext.ux.TouchGridPanel.js"></script> <script type="text/javascript" src="main.js"></script> </head><body></body> </html>
-
19 Aug 2011 8:01 AM #195
How to turn off display refreshing (mask) when store.load()
How to turn off display refreshing (mask) when store.load()
Thanks, it is great extension and I was able to load and pull remote list data without any problem.
Only one problem for me is display refreshing (mask) when store.load, which is very annoying.
In Ext4, I can turn off the display refreshing on grid by: viewConfig: { loadMask: false }
How do I turn it off on touch grid? Thank you.
Jimmy
-
20 Aug 2011 2:16 AM #196
-
20 Aug 2011 8:02 AM #197
-
23 Aug 2011 10:40 AM #198
any way to hide header and disable sorting
any way to hide header and disable sorting
I like to hide header of the grid panel to save a bit space.
Also like to disable sorting if header is displayed (sorting is not working if renderer for the column ).
Any way to do this? Thanks.
-
31 Aug 2011 1:25 AM #199
hello,
your work is awsome, but could you give me the way to make the grid scrolling horizontally ?
I have tried the code below, but only the rows are scrolling, the header stay fixed, and the grid is cut in the rigth side...
var grid = new Ext.ux.TouchGridPanel({
fullscreen : true,
store : store,
multiSelect : false,
scroll : 'both'
thank you !
-
5 Sep 2011 7:08 AM #200
hello,
not one has an idea or an example of an horizontal grid (with horizontal scroll). ?


Reply With Quote
