Cannot set the DataGrid column width
I am very frustrated with the DataGrid control and I don't understand why it won't work. I followed the tutorial "Build year Application In An Hour" by Adobe and finally managed to extract data from a database in a DataGrid control, the data very well, but all the columns are the same width and will not change when creating. Of course I can drag the column widths when the DataGrid control has made, but you shouldn't do that. The columns are not enough even wide to fit in the title of each column. The tutorial mentioned resizing of columns, but does not specify how. I've manually entered in the < S:GridColumn > tags and entered like width = "800" see no change. I changed the width of the data grid itself, I even tried setting the width to 100%. I also went in the "Configure columns" dialog, and then in advanced and set a minWidth, but it still doesn't work, I even disabled 'resize' and still nothing. I also tried different combinations of the aforementioned attempts.
How can it be difficult to set the width of a column?
I should also mention that I use Adobe Flex Builder 4.5 for PHP.
Well, I solved the problem and I'm very embarrassed to say that it is my browser cache. It was not show my saved new, which is a bit worrying plans sometimes that I need to change the small values and run my application every 10 seconds to see the update.
Tags: Flex
Similar Questions
-
Cannot set the JTable column width
I got into difficulty JTable column widths. The table is placed inside a get. I use getColumnModel () .getColumn () .setPreferredWidth () for each of the JTable columns but when displayed, they are all the same size. If I understand setAutoResizeMode (array. AUTO_RESIZE_OFF), I get the same results (only the table is not fill the frame). I created a short program that exhibits this behavior. What Miss me?
package testTableData; import java.awt.Dimension; import java.util.ArrayList; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.SwingUtilities; import javax.swing.table.AbstractTableModel; public class TableData { private ArrayList<String> col0 = new ArrayList<String>(); private ArrayList<Integer> col1 = new ArrayList<Integer>(); private ArrayList<Integer> col2 = new ArrayList<Integer>(); private TableDataModel model = new TableDataModel(); private JTable table = null; private JScrollPane scrollPane; TableData() { table = new JTable(model); table.setAutoResizeMode(table.AUTO_RESIZE_OFF); table.setPreferredSize(new Dimension(300,300)); table.getColumnModel().getColumn(0).setPreferredWidth(200); table.getColumnModel().getColumn(1).setPreferredWidth(50); table.getColumnModel().getColumn(2).setPreferredWidth(50); scrollPane = new JScrollPane(table); } public JScrollPane getScrollPane() { return(scrollPane); } public void add(int index, String c0, Integer c1, Integer c2) { col0.add(index, c0); col1.add(index, c1); col2.add(index, c2); model.fireTableStructureChanged(); } class TableDataModel extends AbstractTableModel { private String[] columnNames = { "Col0", "Col1", "Col2" }; public String getColumnName(int col) { return columnNames[col].toString(); } public int getRowCount() { return col0.size(); } public int getColumnCount() { return columnNames.length; } public Object getValueAt(int row, int col) { if(col == 0) return(col0.get(row)); else if(col == 1) return(col1.get(row)); return(col2.get(row)); } public boolean isCellEditable(int row, int col) { return false; } public Class getColumnClass(int c) { return getValueAt(0, c).getClass(); } } public static void main(String args[]) { SwingUtilities.invokeLater(new Runnable() { public void run() { TableData td = new TableData(); td.add(0, "AAAAA", 0, 1); td.add(1, "BBBBBBBBB", 10, 11); td.add(2, "CCCCC", 20, 21); JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(400,400); frame.add(td.getScrollPane()); frame.setVisible(true); } }); } }
model.fireTableStructureChanged ();
Each time you call this method recreates the JTable the TableColumnModel that re-creates all the TableColumns for column widths to get back to their default values.
I see no reason that you need to create a custom TableModel. Just use the DefaultTableModel. You can load the template with the default data or dynamically update the model using addRow/removeRow methods.
-
Satellite M100: Cannot set the resolution 1368 x 768 on external LCD screen
Satellite M100-179
Graphics - ATI x 1400 card.
Cannot set the resolution 1368 x 768 on connected usung Sub - D LCD TV Samsung 32R72
There is no resolution 1368 x 768 in the available resolution list.The graphics card hardware support different screen resolutions, but if the driver doesn't contain this resolution of the screen so that you cannot choose it.
I think so you re not able to choose this special resolution on the external display.In my opinion it has nothing to do with the graphics card or with the screen, but only with the graphics driver.
-
Cannot set the time zone of Moscow winter + 3 hours.
Cannot set the time zone of Moscow winter + 3 hours.
Set the time zone Minsk 3 after the GPS clock moves forward 1 hour, timezone is set back from Moscow + 4.
It is an error of your software when you are ready to address this issue.Automatic deactivation date & time(Settings>Date&Time...)
-
Cannot find the left column that used to be on the documents and photo files.
Cannot find the left column that used to be on the documents and photo files. On this missing column I know was there before, had options fax, copy and other things we could do with these files. I want to get that back. Thank you.
With my Documents folder open, go to Toolsand then click on Options files . On the general tab, tasks section, choose Show tasks in folders.
I would like to know if it works. Thank you.
-
I use windows 7. How to change and be sure the default column width in Windows Explorer
I use windows 7. How to change and be sure the default column width in Windows Explorer
Hi Jimsw,
· If it works well before?
· You did changes to the computer before the show?
Explorer Windows will remember changed settings, check if this not happen as planned.
Follow the suggestions below for a possible solution:
Method 1: I suggest running the fix of the article and check if it helps.
Diagnose and repair Windows files and folders problems automatically
http://support.Microsoft.com/mats/windows_file_and_folder_diag/
Method 2: You can increase the width of the selected columns and apply the settings to all files and check.
a. right click on an empty space in the Windows Explorer, click on sort by.
b. now, enter the size required in the Pixel with and click OK.
Now, click on the drop down menu to organize and click on folder and Search Options.
Click view and click apply to folders and click OK.
I hope this helps.
-
Cannot set the restore point with the error "The Volume Shadow Copy service used by the system restore does not work." How can this be repaired?
Hi rebick,.
Try the troubleshooting steps presented by spirit X in this thread.
Dena
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think. -
BIOS HP Compaq Elite (i5-2400 CPU) 8280 cannot set the VT option
BIOS HP Compaq Elite (i5-2400 CPU) 8280 cannot set the VT option
found in the security system] [, thanks]
-
Hi all
I tried provide access to filter the group in both SSP and thru Maxl command but still get the error below. Any experience of this problem? If Yes, please let me know how you solved this problem.
ERROR - 1051414 - cannot set the role of group with shared services [30:1101:JNDI error] error.
Thanks in advance!
Krishna
Read the support document that I posted the link, prior to changes for openldap ensure you that it is saved.
-
How to set the height and width of dvt:piechart?
Hello
After upgrading to 10.1.3 jdev the new PIE is < dvt:pieChart >.
I need to set the width and height or if not possible set the height and width of the container and let the repeating table using the container.
Thanks in advance
Emile BITAR
Change this by using the attribute "inlineStyle". Set inlineStyle = "width: 200px;" height: 300px; »
-
I'm doing slideshows to music with an opening, I would switch to LR, but you cannot set the duration of each slide (in my case the score) based on listening to the music. (In the opening by clicking on the "stopwatch" and pressing enter at each change of image). Adobe staff question: can I expect to find this option in a future release?
Hi Pcaubi,
There is no such updates for the same from now.
I suggest you to please put in a feature request to: Photoshop community customer family
Kind regards
Tanuj
-
Cannot set the configured property "/ Initial.initialServices".
Hi all
I'm getting following error.
05:21:52, 006 INFO [STDOUT] cannot set the configured property "/ Initial.initialServices" atg.nucleus.ConfigurationException: could not resolve the component/com/progiweb/fbconnect/pipeline/FacebookAuthStatusServlet
05:21:52, 013 INFO [STDOUT] * error
05:21:52, 064 INFO [STDOUT] cannot set the configured property "/ Initial.initialServices" atg.nucleus.ConfigurationException: could not resolve the component/com/progiweb/fbconnect/pipeline/FacebookProfileRequestServlet
I checked the path of configuration of two components and the structure of the servlet is as below.
src/com/progiweb/fbconnect/pipeline/FacebookAuthStatusServlet.java and src/com/progiweb/fbconnect/pipeline/FacebookProfileRequestServlet.java.java
For properties files I created them under the path - config/atg/dynamo/servlet/dafpipeline / config/atg/dynamo/servlet/pipeline
Inside of these I keep the files FacebookAuthStatusServlet.properties and FacebookProfileRequestServlet.properties
The Initial.properties is as below - config/atg/dynamo/servlet/Initial.properties
The content of Initial.properties is-
& initialServices =.
/ ATG/Dynamo/servlet/dafpipeline/FacebookAuthStatusServlet,.
/ ATG/Dynamo/servlet/dafpipeline/FacebookProfileRequestServlet
Should I have to keep the two pipelines-dafpipeline and pipeline or one of them?
And my pipeline structure is correct or not?
How to solve the error above?
Please help on this!
Kind regards
Prateek
You seem to be confusing core components and classes Java. They are completely different. The error message that you get "Unable to resolve component", says that the kernel is unable to find a file of specific properties anywhere in the directories named in your configpath trees. To be precise, there is no file named /com/progiweb/fbconnect/pipeline/FacebookAuthStatusServlet.properties in your config directory. If I read correctly this conversation, it is because the file with this name is a .java file, not a .properties file. The two most likely causes of your problem are:
1. you have a file of properties somewhere that mentions/com/progiweb/fbconnect/pipeline/FacebookAuthStatusServlet as the value of something else than $class. $class is a special case whose value is sought by a Java ClassLoader in the classpath. Values of the other properties are interpreted as references to the component, and looked up from core in the configpath.
2. in the directory tree that contains the /com/progiweb/fbconnect/pipeline/FacebookAuthStatusServlet.properties isn't in the configpath. ATG displays the complete configpath during startup. If your directory is missing, you have may have specified correct information in the entrance of the ATG-Config-path in your module MANIFEST. MF file.
-
ORA-12054: cannot set the ON COMMIT...
Hello
can someone please tell me what am I missing here?
I can't create a materialized view, but I can't understand why is this?
SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production PL/SQL Release 9.2.0.7.0 - Production CORE 9.2.0.7.0 Production TNS for HPUX: Version 9.2.0.7.0 - Production NLSRTL Version 9.2.0.7.0 - Production SQL> r 1* select master,primary_key from user_mview_logs where MASTER='CIS_CASE' or master='CCR_ACTION_DEF' MASTER PRI ------------------------------ --- CCR_ACTION_DEF NO CIS_CASE NO SQL> r 1 SELECT a.table_name, a.constraint_name, a.constraint_type, b.column_name 2 FROM user_constraints a, user_cons_columns b 3 WHERE a.constraint_name = b.constraint_name 4* AND a.table_name IN ('CIS_CASE', 'CCR_ACTION_CASES') TABLE_NAME CONSTRAINT_NAME C COLUMN_NAME ------------------------------ ------------------------------ - ---------------- CCR_ACTION_CASES ID_PK P ID CIS_CASE PK_CIS_CASE P ID CIS_CASE SYS_C008496 C ID SQL> CREATE MATERIALIZED VIEW mv 2 REFRESH FAST ON COMMIT 3 AS 4 SELECT c.ID, 5 CASE 6 WHEN (c.script_id IS NULL OR c.queue_id IS NULL) 7 THEN 1 8 WHEN c.script_id IS NOT NULL AND c.queue_id IS NOT NULL 9 THEN 2 10 END TYPE, 11 c.datum + a.due_time / 24 - a.alarm_due_time_1 / 24 alarm1, 12 c.datum + a.due_time / 24 - a.alarm_due_time_2 / 24 alarm2, 13 c.datum + a.due_time / 24 due_date 14 FROM ccr_action_def a, cis_case c --users u 15 WHERE NVL (a.queue_id, NVL (c.queue_id, 0)) = NVL (c.queue_id, 0) 16 AND NVL (a.type_id, NVL (c.case_code_type_id, 0)) = 17 NVL (c.case_code_type_id, 0) 18 AND NVL (a.code_id, 19 NVL (NVL (NVL (c.code_id_4, code_id_3), code_id_2), code_id_1) 20 ) = NVL (NVL (NVL (c.code_id_4, code_id_3), code_id_2), code_id_1) 21 AND (c.datum + a.due_time / 24 < SYSDATE) 22 AND state IN (1, 2) 23 UNION 24 SELECT c.ID, 3 TYPE, a.due_date - a.alarm_due_time_1 / 24 alarm1, 25 a.due_date - a.alarm_due_time_2 / 24 alarm2, a.due_date 26 FROM ccr_action_cases a, cis_case c 27 WHERE c.ID = a.cis_case_id 28 AND (a.due_date < SYSDATE) 29 AND state IN (1, 2); FROM ccr_action_cases a, cis_case c * ERROR at line 26: ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
Vili Dialis wrote:
Rob, if you have any comments on my last query operation, I would be greatfull.Vili,
You must start with a join view which does not contain any aggregate. Just a join of the ccr_action_def and cis_case. And don't forget to include the two table rowid to make quickly updatable. Then create a full blown newspaper on top of the join mv materialized view and create mv aggregation, selecting in the mv to join.
Kind regards
Rob.Published by: Rob van Wijk on 14-dec-2009 12:09
And two boards that are not linked mv:
(1) as has said, use a.id and c.id in a group by clause for the query itself work
(2) do not use the string ' 14.12.09", use a date but you compare it with a date. So use: date "2009-12-14' -
Stop in the middle of the table column width setting
I set some tables previously built.
When you adjust the width of columns, some tables develop the center column and others on the left side of the column.
Can someone tell me where the setting is for this?
Thank you very much
pkahrel wrote:
Danny meant that you should look at paragraph of parent of the table, not the table itself.
That's it, thank you. I was struggling to think what to call it.
-
Resizing DataGrid column width
How can I enable the user to quickly adjust automatically a column by double-clicking it, as you can do in Excel?
Also, how could I have the columns automatically sized this way during load?
No mechanism built as far as I know. This shuold help you get started:
var int cols = this.dg.columnCount;
for (var i: int = 0; i< cols;="" i++)="">
Col: DataGridColumn var = dg.columns [i];var tlm:TextLineMetrics = dg.measureText (col.headerText);
Col.Width = tlm.width;
}Basically, you'll need to go on each column, measure the width of the text that is in this case, I will put only the width as wide as the header text - using the TextLineMetrics class and set the column width. You might alos have invalidated the DataGrid Properties after the loop to force a refresh.
ATTA
Maybe you are looking for
-
I have a Mac Pro 3.1 and one of the elevators of memory is dead. It's Elevator B and I was wondering if a riser scored will work in the B slot. Thanks for your help GC
-
As the previous thread was closed without a real resolution - https://support.mozilla.org/en-US/questions/941350?esab=a & s = & r = 0 & as = s I managed to solve this problem on my end by reinstalling just firefox using the location of the language o
-
How to grab the scroll bar in the mail? It flashes by too quickly?
In mail, there is a scroll bar that appears briefly on the right and left side of my Inbox. I want to be able to grab the scroll bar to scroll through my mail; However, the scroll bar appears only briefly and not continuously - then, I can't seem to
-
scanning documents with multiple pages on 2542 all-in-one
Therer is a way to scan multiple pages into a single pdf file on an HP 2542 all-in-one printer/scanner
-
Bridge CC Version previous (2014?)
Sorry for this question: why CC bridge is under the PREVIOUS VERSION?Bridge CC is communicated in 2014?Really thanks!