Why the last column change width automaticlly?

a datagrid has 3 columns,
set horizontalScrollPolicy="auto"
I stretch first or second column, the third(last) column will
change width automaticlly. If I wanna fix the width of last column,
what should I do?
thanks....

I don't think there is way to do this. This seems to be
hard-coded -- thru a private function called calculateColumnSizes()
-- in the DataGrid class.
So you're essentially out of luck! Unless, of course, you
decide to subclass the DataGrid class, override updateDisplayList
method and provide your own implementation of calcualte column
size!
Or maybe, logging a change request for Flex team.
ATTA

Similar Messages

  • How to avoid that the last column in a datagrid increase the width out of the window?

    I have a datagrid with this configuraction:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}"/>
    </DataGrid.Columns>
    The last column is a description, so the text can be a bit large. so I would like that the width don't be wnough greater than makes the datagrid has a width out side the window.
    For this, I have read that I can use Width="Auto" in all the columns and in the last column width="*", but in this case all the coloumns has a very low width so I can't read anything.
    The code that I have used in this case is:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width=""Auto"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width=""Auto"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    I am using visual studio community edition and wpf 4.5.1.
    Thank so much,

    >>For this, I have read that I can use Width="Auto" in all the columns and in the last column width="*", but in this case all the coloumns has a very low width so I can't read anything.
    Can't you just set an explicit width for the first two columns then?, e.g.:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width="100"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width="100"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    There is also a MinWidth property that you can use to prevent the columns from being to narrow:
    <DataGrid.Columns>
    <DataGridTextColumn Header="Column01" Binding="{Binding Property1, Mode=OneWay}" Width="Auto" MinWidth="100"/>
    <DataGridTextColumn Header="Column02" Binding="{Binding Property2, Mode=OneWay}" Width="Auto" MinWidth="100"/>
    <DataGridTextColumn Header="Column03" Binding="{Binding Property3, Mode=OneWay}" Width=""*"/>
    </DataGrid.Columns>
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question.

  • Unable to filter the report by clicking the last column's name

    Hi,
    I have interactive report page having lots of column. All columns were not fitting in the screen so I added a code in the region--- header and footer section---
    <div style="overflow: auto; width: 1220px; height: 700px;">
    I got a scroll bar at the bottom. But a new problem arised. When I am trying to filter the report by clicking the column name in the report page , a popup is opening for the first column but the pop up is not opening for the last column. For the middle columns, the popup is opening but not below its name. This pop is for filtering the report based on that columns.
    Please give some idea to fix this bug.
    Thanks,
    Chandra Bhanu

    You could try to display as many columns as fit your screen, and put the rest of your columns as form fields in a detail view, somewhat like this:
    http://apex.oracle.com/pls/apex/f?p=vincentdeelen:report_details_in_iframe_v1
    Please tell the steps how to do it.
    Thanks,
    Chandra Bhanu

  • How do I create a new row on tab out of the last column, last row?

    JDev 11.1.2.1.0.
    I've seen a few topics on this but none that I think were really very good solutions.
    Use Case:
    On tab out of the last column in the last row, a new row should be added to the end of the table. Bonus points for setting the focus to the first <af:inputText> of the newly created row.
    Complications:
    1. I'm having a heck of a time trying to find a function that returns the column's displayed index. Sadly, <column binding>.getDisplayIndex() returns -1 unless the user has manually re-ordered the column.
    2. Value Change Listeners only fire if there is a value change. Guess that means I need to do client/server listeners to check each and every <af:inputText> for a tab press?
    3. I'm not even going to get into setting the focus. With all the templates, regions, etc. going on, it's dang near impossible.
    Any ideas on how to attack this one?
    Will

    Hi,
    You will need to use the Run Engine Installation Wizard found on the Tools menu. In addition you need to create a installation set for the operator interface.
    Look at Chapter 16 Distrubuting TestStand ( chapter 17 for version 2).
    Once you have created your installation, install is on your new system.
    The serial number etc is part of the process model. When you run the entry point 'Test UUTs' the PreUUT callback is executed which asks the user for the serial number.
    Hope this helps
    Ray Farmer
    Regards
    Ray Farmer

  • Issue with the last column stretching in ADF table

    There is an issue wherein when  I try stretching the last column of the ADF table to reduce its width it does stretch. But whenever I try stretching it back to this original position it doesn't despite having columnstretching attribute set to multiple and assign widths in percentages to columns . When I set the columnstretching attribute to none, the last column does stretch back and forth but on page load the table does not stretch to its full width despite having styleClass="AFStretchWidth". Now I dont want to be assigning fixed width in pixels to the columns. I would want the last column to stretch back and forth with columnstretching="multiple" and styleClass="AFStretchWidth". I see the same issue on components demo page as well. Tag Guide

    If you are trying that each column gets equally stretched based on the browser, its not possible as adf doesn't supports that.
    If your table is not stretching use styleClass="AFStretchWidth".
    But if all your columns are not stretching you can only try setting column widths + columnStretching property (where you can specify which column to stretch to fill all the spaces)
    Amit

  • A special character in the last column in my external table

    Hello,
    I'v made a external table that looks like this :
    CREATE
    TABLE "REC_XLS"
    "FINANCE_DATE" VARCHAR2(50 BYTE),
    "CREATION_DATE" VARCHAR2(50 BYTE),
    "SENT_DATE" VARCHAR2(50 BYTE),
    "REMARKS" VARCHAR2(200 BYTE),
    "REMAINING_QUANTITY" VARCHAR2(30 BYTE),
    "CODE" VARCHAR2(30 BYTE)
    ORGANIZATION EXTERNAL
    TYPE ORACLE_LOADER DEFAULT DIRECTORY "LOADER" ACCESS PARAMETERS (
    RECORDS DELIMITED BY newline LOAD WHEN CODE!=BLANKS Skip 1 FIELDS
    TERMINATED BY 0X'09' MISSING FIELD VALUES ARE NULL REJECT ROWS
    WITH
    ALL NULL FIELDS ( Finance_date,
    creation_date, sent_date, Remarks,
    remaining_quantity, code) location ( 'Finance.tsv' )
    I exported the result in xls file and I saw in the last column a special character. The result of a copy and paste is prenseted here : "ABE
    You should notice that the last quote is in the upper line instead of at the end of ABE. This means, I think, that there is a carriage return at the end. And the 0X'09' is the tab separator. How can I get rid of this character ?

    my guess is that you run the load on unix server which uses default LF end-of-line character and the file has dos CRLF end-of-line, the easiest option is to change records delimiter in the DDL and replace "RECORDS DELIMITED BY newline" with code below
    RECORDS DELIMITED BY '\r\n'in general end-of-line can be really any character, sample above shows CRLF but it can be TAB, space, | or any other character or set of characters. I have samples of special characters on my blog http://jiri.wordpress.com/2009/01/29/oracle-external-tables-by-examples-part-1/
    hope this helps
    jiri

  • Default Carriage return in the last column when data is downloaded to Excel

    Problem:
    When you download data into Excel and if the last column of your excel is a numeric field, XMLP will add a carriage return (special character) to your numeric field. This feild will be considered as character field by excel.
    Work Around:
    When you build the template, create an empty column as your last column and leave E (or end-for-each) in that empty column.
    Note:
    If the last column is a character column then you do not have to do this.

    I originally had that END:VCARD without any carriage return.
    But I still get an extra carriage return at the end when the JSP renders to VCF
    I'm using Tomcat running on Linux.
    I found this, article which implies (but does not explicitly say) JSP in general adds a newline to the last line:
    http://www.caucho.com/resin-3.0/jsp/faq.xtp (But its not tomcat either, so maybe this info is irrelevant).
    Edited by: shogo2040 on Dec 22, 2008 3:31 PM - changed rendered to VCF from rendered to JSP

  • Emacs is displaying the first column of the line on the last column of the previous line

    The first column of my lines are being displayed on the last column of the previous line. This a very irritating glitch that I have no clue how to fix or even troubleshoot. (red bars were added using preview to hide personal info)
    I've downloaded MacPorts and reinstalled emacs:
    GNU Emacs 24.4.1
    Copyright (C) 2014 Free Software Foundation, Inc.
    GNU Emacs comes with ABSOLUTELY NO WARRANTY.
    You may redistribute copies of Emacs
    under the terms of the GNU General Public License.
    For more information about these matters, see the file named COPYING.
    I'm open to any suggestions on how to fix this graphical glitch.
    Much thanks
    Message was edited by: Conner_36

    Given that the Emacs for OS X works ok and the Emacs shipped with OS X works it would seem to be some issue with MacPorts and their version.
    Totally unfamiliar with MacPorts so have no idea how the program gets compiled,what libraries it is using and what if any config settings are needs or set so I'm afraid I won;t be much help there.  That you are on a MBP with a retina display may be part of the problem.
    So with the setup you have now, hardware and software including OS,  it was working and then just like that it stopped? Something much have changed around the time it stop working if you can think back to then it might help you resolve the problem.
    As you are doing programming can i assume you have Xcode and the command line tools installed? If not how do you compile your code? The reason I ask is compiling Emacs from there GNU source is not all that difficult. It might be worth trying that.
    One last thing given that the two other versions of Emacs displayed the file OK this strongly suggests the problem is not in your .emacs file or your environment however as I wrote I am not familiar with MacPorts so it is possible there is another config file messing you up. As a test for this create a new user or log in as the Guest user (this is best as you;re guaranteed the environment is clean) and look at the file in question in MacPorts Emacs. If it displays OK then there is something in your environment causing this, If it messes up  even in the new user then I'd say ditch MacPorts..
    regards
    <edit>
    Just to rule out init files  if you start emacs with the -q(minus que) flag the .emacs file is not read in, if you use  --no-site-file it will not load the site file if it exists.
    I'd try running the MacPorts emacs with those two flags to see f anything changes.

  • How to get the last column info of the given table

    Hi All,
    I want to get the last column information like :
    column name, datatype of the last column in the given
    table use PL statement. Please help.
    Thanks,
    JP

    SCOTT@orcl SQL> desc emp
    Name                                                  Null?    Type
    EMPNO                                                 NOT NULL NUMBER(4)
    ENAME                                                          VARCHAR2(10)
    JOB                                                            VARCHAR2(9)
    MGR                                                            NUMBER(4)
    HIREDATE                                                       DATE
    SAL                                                            NUMBER(7,2)
    COMM                                                           NUMBER(7,2)
    DEPTNO                                                         NUMBER(2)
    SCOTT@orcl SQL> select column_name, data_type from user_tab_columns
      2  where table_name = 'EMP'
      3  and column_id = (select max(column_id) from user_tab_columns
      4  where table_name = 'EMP');
    COLUMN_NAME                    DATA_TYPE
    DEPTNO                         NUMBER
    SCOTT@orcl SQL>                                                                      

  • Finder in column view has no expander divider on the last column

    I deal with a lot of graphics on my computer and I have a lot of subfolders. While in finder in column view there is no expanding divider for the last column when it is showing a graphic. When I first open a photo or graphic in finder the last column shows the graphic smaller than regular size. In SL there was a column divider to expand only that last column so I could make the graphic larger to see it better. Now in Lion there is no divider on the right side of that last column to expand the last column where the grahic is showing. In order for it to finally expand I have to drag the right side of the Finder window all the way across my display until the bottom slider bar disappears and then that last column will expand. This is frustrating having to have my Finder all across my display just to get the graphic larger.
    Is there a way to get an expander divider to show up for the last column when viewing a graphic in column view? I know I can click on the "eye" icon to see it, but the column view will expand the graphic larger than 100% so I can see more details.
    Thanks for any and all help.
    Connie

    Yes, that is how my whole finder window expands across my display until the bottom slider bar disappears....then and only then does the last column expand. I have to have open as many as 8 columns to get to my graphic. Keeping the Finder window to a smaller size and using the bottom slide bar to navigate to the far right column is nice, but all I want is that far right column where my graphic is showing to expand so I can see it better.
    Thanks but what you suggest only resizes the whole Finder window until it can expand no further, then the last column expands the graphic. But then my whole display is a huge Finder window.

  • HT201317 why the last photos in photo stream are not sync with my iPad?

    why the last photos in photo stream are not sync with my iPad?

    Photostream only syncs photos over Wi-Fi, make sure you are connected to Wi-Fi to begin with.
    Photostream only syncs when the camera app is closed, ensure it is closed.
    Photostream only syncs when the battery is above 20%, try recharging the device
    Try disabling photo stream on your device (settings > iCloud), restarting your device and then re-enabling photo stream.
    If this doesn't help you may need to reset photo stream. You can do this at icloud.com by clicking on your name in the top right corner and then the advanced settings in the pop-up dialogue box that appears.
    Note: disabling photostream and re-enabling it will result in any photos that are currently in the photostream album on your device, that are older than 30 days old, not being added back.

  • How do I get the last COLUMN in an Excel Sheet using Report Generation toolkit in LV7.1?

    I am trying to get the last column in an Excel sheet using the Report Generation toolkit. The function "Excel Get Last Row" does not give last column info. Is there a function that will do this?
    Thanks

    Hello –
    I think the following example program might be helpful to get you started programming your application.
    Get Excel Data from Specified Field.
    Hope this helps!
    SVences
    Applications Engineer
    National Instruments

  • Know the Last column of the table

    Hello 
    i use vb.net with excel
    I have a table
    with a spreadsheet, I want to know the Last
    column of the table 
    please help me ??

    i have a table in Excel file and i want to add the last column of this table in datagridview 
    i want to set ShtRange to give me the last column 
    i use this but don't give me a result 
    With Form1.xlWorkSheet
    Dim ShtRange As Range
    Dim dt As New System.Data.DataTable
    ShtRange = Form1.xlWorkSheet.Cells(1, Form1.xlWorkSheet.Columns.Count).End(XlDirection.xlToLeft)
    For Cnum As Integer = 1 To ShtRange.Columns.Count
    dt.Columns.Add(New DataColumn(TryCast(ShtRange.Cells(1, Cnum), Excel.Range).Value.ToString()))
    Next
    dt.AcceptChanges()
    Dim columnNames As String() = New String(dt.Columns.Count - 1) {}
    For i As Integer = 0 To dt.Columns.Count - 1
    columnNames(0) = dt.Columns(i).ColumnName
    Next
    For Rnum As Integer = 2 To ShtRange.Rows.Count
    Dim dr As DataRow = dt.NewRow()
    For Cnum As Integer = 1 To ShtRange.Columns.Count
    If TryCast(ShtRange.Cells(Rnum, Cnum), Excel.Range).Value2 IsNot Nothing Then
    dr(Cnum - 1) = TryCast(ShtRange.Cells(Rnum, Cnum), Excel.Range).Value2.ToString()
    End If
    Next
    dt.Rows.Add(dr)
    dt.AcceptChanges()
    Next
    Me.DataGridView1.DataSource = dt
    End With
    this is my table :

  • Focus should remains in the last column .

    Hi,
    I am using JTable with single row and few columns. When I navigate (tab) from last column it returns to the first column but my requirement is it should remain in the last column itself.
    Thanks in advance.
    Thanks and Regards,
    Shiva

    Okay, that makes sense. However, I modified my code to actually move the lead, and it still didn't work. Curious, I added a pop up window to the code, and I found out that it doesn't get called. The tab key still doesn't do anything. I miss KeyListeners already :(
    Can you spot anything wrong with how I'm doing this?
    InputMap im = _table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    KeyStroke tabKey = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);
    Action tabAction = new AbstractAction(){
                   public void actionPerformed(ActionEvent e){
                        int leadColumn = _table.getColumnModel().getSelectionModel().getLeadSelectionIndex();
                        leadColumn ++;
                        if(leadColumn > 4){
                             leadColumn = 4;;
                        _table.getColumnModel().getSelectionModel().setLeadSelectionIndex(leadColumn);
                        JOptionPane.showMessageDialog(null, "L: " + leadColumn);  //this doesn't happen either
    im.put(tabKey, tabAction);

  • Please ensure that the applicationhost.config file is correct and recommit the last configuration changes made

    I am receiving event ID 5189 on Server 2008 R2, IIS 7.5.  I experience this error across a number of servers, each of which is running only the default web site, but have 600+ applications running on the default web site.  Each application
    has its own application pool.  My point is, the applicationhost.config is rather large.
    I have seen a number of posts on this error message, but my issue itself seems to differ somewhat.  I am aware of a similar post: http://social.technet.microsoft.com/Forums/en-US/3128ee93-1319-4cc2-9257-003512caf476/event-id-5189-microsoftwindowswas?forum=exchangesvrgeneral
    which points to KB http://technet.microsoft.com/en-us/library/cc734988%28v=ws.10%29.aspx
    However, in my case, it doesn't seem that the extreme measures for this resolution are required.  The error usually indicates a corrupted applicationhost.config that must be manually fixed, or otherwise the WAS service needs to be restarted, or the
    server itself, etc.
    In my case, the issue can usually be fixed by an application pool recycle, or at worst a stop/start.  I have an application which is sensitive to recycles, and so we do not have periodic recycle events configured for this application, which is the bulk
    of the applications on the servers.  It seems to me that this issue is usually caused by the application being in use when there is an applicationhost.config change.
    For instance, we have one application that we deploy using msdeploy.  We found that when we ran an installation for this application via msdeploy, we were receiving this event, and we would subsequently get 500 errors in the application (sometimes the
    application pool corresponds to that which is identified in the event log, sometimes it doesn't).    It seems like applications that were being hit at the time the applicationhost.config was modified by msdeploy were affected.  In an attempt
    to correct this, we moved from msdeploy to a batch file containing appcmd commands.  This also did not resolve the issue.
    I have another application which is installed using PowerShell commandlets.  We started to notice that this script also caused the issue to occur on occasion.  As I continued to identify different processes that resulted in the same issue, I came
    to the conclusion that this is likely due to any change in the applicationhost.config.  I assume the issue is that the applicationhost.config is modified during a read operation to the file by the application pool, or WAS service, and that the recycle
    event, which corrects the issue, forces a re-read of the applicationhost.config, resolving the bad-read issue.
    Has anyone else experienced this, or do you have any recommendations?  My current work-around is to not install any applications during peak hours, and performing an IISRESET after installs are completed, to ensure application stability.
    Message              : The Windows Process Activation Service failed to generate an application pool config file for application pool 'myAppPool'. The error type is '7'. To resolve this issue,
    please ensure that the applicationhost.config file is correct and recommit the last configuration changes made. The data field contains the error number.
    Id                   : 5189
    Version              : 0
    Qualifiers           : 49152
    Level                : 2
    Task                 : 0
    Opcode               : 0
    Keywords             : 36028797018963968
    RecordId             : 324108
    ProviderName         : Microsoft-Windows-WAS
    ProviderId           : 524b5d04-133c-4a62-8362-64e8edb9ce40
    LogName              : System
    ProcessId            : 0
    ThreadId             : 0
    MachineName          : MyComputer
    TimeCreated          : 3/3/2014 9:03:24 PM
    ContainerLog         : system
    MatchedQueryIds      : {}
    Bookmark             : System.Diagnostics.Eventing.Reader.EventBookmark
    LevelDisplayName     : Error
    KeywordsDisplayNames : {Classic}
    Properties           : {System.Diagnostics.Eventing.Reader.EventProperty, System.Diagnostics.Eventing.Reader.EventProperty, System.Diagnostics.Eventing.Reader.EventProperty}

    As an update to this issue, after doing some research, it appears the behavior is related to a new feature in IIS7 called Application Pool Isolation (http://technet.microsoft.com/en-us/library/dd163536.aspx).
    This new feature prevents cross-application spillage by isolating the configuration for each application pool in IIS.  So in reality, an application pool never actually reads the applicationhost.config - that is just a master file, and each time it
    is update, it triggers a change to the individual application pool configuration files, located in C:\inetpub\temp\apppools.
    We did try setting Advanced Settings > Disable Recycling for Configuration Change to true, but after an IIS reset we were still able to reproduce the issue - worse actually, because in our test program, which continually hits the web
    service, and also continually makes apphost.config changes, when the two events collide, the 500.19 issue precipitates; but after an additional change to the apphost.config, it seems that the additional changes will actually correct the issue (seemingly forcing
    another recycle, which is also how we resolve the issue manually); after making this setting adjustment, once the 500.19 issue precipitates, additional changes to the apphost.config does not correct the problem, only a manual recycle corrects it.  This
    is the recycling.disallowRotationOnConfigChange property of the app pool.  We also set the setting for recycling.disallowOverlappingRotation to True as well, with the same result.
    We ARE able to prevent this issue by setting the C:\inetpub\temp\apppools\myapppool\myapppool.config to read-only, but for obvious reasons, this is not a desired work-around.
    It seems like what is happening is that any change to the ApplicationHost.config is resulting in each of the C:\inetpub\temp\apppools temp application pool config files being updated as well, in addition to triggering an application pool recycle.  It
    seems to me the desired behavior would be that these files are only updated if the applicationhost.config changes are specific to that application pool - but that doesn't seem to be the behavior.
    After turning on failed request tracing, I was able to narrow the error down more:
    ModuleName
    AnonymousAuthenticationModule
    Notification
    2
    HttpStatus
    500
    HttpReason
    Internal Server Error
    HttpSubStatus
    19
    ErrorCode
    2147942413
    ConfigExceptionInfo
    \\?\C:\inetpub\application\application\web.config ( 9) :Failed to decrypt attribute 'password'
    Notification
    AUTHENTICATE_REQUEST
    ErrorCode
    The data is invalid. (0x8007000d)
    This seems to be pretty static.  Trying to look into possible causes of this issue.

Maybe you are looking for

  • Runtime Error: "Time out" for RFC.

    Hi,   During RFC, I am getting a runtime error stating "Timeout error".  Even while the job is run in background I am getting this error. Seems like the time for RFC task is set to 600 secs. How to resolve this and is there any way we can see time li

  • Open Hub Destination over a Datasource as a source

    Hi Expert,                 I am trying to create Open hub destination over Datasource as a source it showing me an error "Cannot connect DataSource to an open hub destination". Can anyone tell me is it possible to create an open hub destination over

  • Error 18 in the Update

    I am attempting to load text from R/3 into an infoobject, and then into an infocube.  The text from R/3 has forbidden characters (i.e. # and tabs).  I have tried adding the forbidden characters in RSKC, and I have tried entering ALL_CAPITAL in RSKC. 

  • Not setting selected value in column of table control

    Hi, I have MATNR field in table control. In PAI code is as follow. PROCESS AFTER INPUT.   MODULE CANCEL AT EXIT-COMMAND.   MODULE VALIDATE.   LOOP WITH CONTROL TC_FORMV.   FIELD /SISLEMCU/CNVADTL-MATNR SELECT *                       FROM  /SISLEMCU/C

  • DAQ Trigering

    I need to multi triggered acquisation. the acquisation need to done in the following way. when the trigger occur the acquisation shold continue for a period of 10 sec continuiously . the sampling rate is 10 Ks/s. i am using PCi -6023E Card for my acq