Trouble with DataGrid's last column width

I have a datagrid with thirty columns.
When I use the mouse to drag the window and resize its size,the last column width becomes more and more wide,and the previous column width is squeezed small.
If anybody else came accross the same problem,can you share your solution?
Thanks,
April

If horizontalScrollPolicy=”off” then there is an attempt to fit all columns within the width of the DG while respecting minWidth of the columns.  Make sure the minWidths allow the columns you want to shrink can shrink.
However, there is still a chance of round-off error.  I think the only solution may be to set the width of each column as you want it on a resize event from the DG.

Similar Messages

  • Problem with attachtment XLS (last column of the xls)

    Hi,
    iam working on interface in which i will be sending an email along with attachtment where my email along with attachtment are working perfectly ,the problem is with the XLS where the last column of the XLS is taking 255 char which is the length of the field .
    How i have to  restrict it ?
    solution on this would be helpfull .
    Thanks ,
    shankar.
    I have attached the sample code too.
    FUNCTION zemail_send_attachment.
    ""Local Interface:
    *" IMPORTING
    *" VALUE(EMAILID)
    *" VALUE(SUBJECT)
    *" VALUE(ATYPE)
    *" TABLES
    *" ATTACH_FILE STRUCTURE SOLISTI1
    *" BODY OPTIONAL
    This table requires information about how the data in the
    tables OBJECT_HEADER, CONTENTS_BIN and CONTENTS_TXT are
    to be distributed to the documents and its attachments.
    DATA objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    This table must contain the summarized data dependent on each object type.
    SAPscript objects store information here about forms and styles,
    for example. Excel list viewer objects store the number of rows and columns
    amongst other things and PC objects store their original file name.
    DATA objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    This table must contain the summarized content of the objects identified as binary objects.
    DATA objbin TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
    WITH HEADER LINE.
    This table must contain the summarized content of the objects identified as ASCII objects.
    DATA objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    This table must contain the document recipients.
    DATA reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE .
    This structure must contain the attributes of the document to be sent.
    DATA: doc_ching LIKE sodocchgi1.
    DATA: tab_lines LIKE sy-tabix.
    Create the internal table for body , subject
    DATA: it_body LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    CONSTANTS: con_cret TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
    con_tab TYPE c VALUE cl_abap_char_utilities=>cr_lf.
    Move Body to Internal Table (body into it_body)
    LOOP AT body .
    MOVE body TO it_body .
    APPEND it_body .
    ENDLOOP.
    doc_ching-obj_descr = subject. "Subject of the Email
    Move the Subject and Body to OBJTXT
    objtxt[] = it_body[].
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    doc_ching-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'RAW'.
    APPEND objpack.
    Convert IT to Excel format
    IF atype = 'XLS' .
    LOOP AT attach_file .
    REPLACE ALL OCCURRENCES OF '#' IN attach_file WITH con_cret ."INTO objbin.
    IF sy-tabix = 1.
    MOVE attach_file TO objbin.
    ELSE.
    CONCATENATE con_tab attach_file INTO objbin.
    ENDIF.
    APPEND objbin.
    ENDLOOP.
    ELSEIF atype = 'TXT' .
    Convert IT to Text format
    LOOP AT attach_file .
    REPLACE ALL OCCURRENCES OF '#' IN attach_file WITH con_cret. " INTO objbin.
    CONCATENATE attach_file con_tab INTO objbin .
    APPEND objbin .
    ENDLOOP.
    ENDIF.
    DESCRIBE TABLE objbin LINES tab_lines.
    objhead = subject. APPEND objhead.
    Creating the entry for the compressed attachment
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 1.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    IF atype = 'XLS'.
    objpack-doc_type = atype.
    ELSEIF atype = 'TXT'.
    objpack-doc_type = 'RAW'.
    ENDIF.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = 'TEST'. "Attachment File Name
    objpack-doc_size = tab_lines * 255.
    APPEND objpack..
    reclist-receiver = emailid.
    reclist-rec_type = 'U'.
    APPEND reclist.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = doc_ching
    put_in_outbox = 'X'
    commit_work = 'X'
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    receivers = reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    OTHERS = 99 .
    ENDFUNCTION.

    I had this problem after migrating to JDeveloper 10.1.3. Problem was with inconsistent DB column types. In our case, the DB column was CHAR containing only numbers, but VO defined it as NUMBER. This caused no problem in 9.0.3 we used before.
       <ViewAttribute
          Name="ParentFlagNew"
          IsPersistent="false"
          Precision="1"
          Type="oracle.jbo.domain.Number"
          ColumnType="NUMBER"
          AliasName="PARENT_FLAG_NEW"
          Expression="PARENT_FLAG_NEW"
          SQLType="NUMERIC" >
          <Properties>
             <Property Name ="DISPLAY_LIST" Value ="1=Yes,0=No" />
             <Property Name ="DISPLAY_LIST_sk" Value ="1=Áno,0=Nie" />
             <Property Name ="Renderer" Value ="sk.transacty.cm_iface.bc4j_common.ListFieldRenderer" />
          </Properties>
          <DesignTime>
             <Attr Name="_DisplaySize" Value="1" />
          </DesignTime>
       </ViewAttribute>

  • Is anyone else having trouble with gmail since last ios 6 update?

    I used to have no trouble with my email on my ipad. Since the latest update, I'm not able to send and sometimes not able to receive gmail. In the past, I used the ipad's built-in mail and it worked fine. Then, when that got buggy, I tried the gmail app for ipad. That works for a short period of time and then that's having the same problems: can't send email, and takes forever to connect with gmail server.
    Does anyone else have this problem? I have no trouble with my phone (not an iphone) or my imac.
    This is really problematic for me as I use my ipad primarily for email.
    Thanks,
    Bob

    adding to the confusion, is now mail isn't accepting my username/password.... never seen an apple app fail this badly before...

  • IText trouble with automatically adjustment of table width

    With iText I an producing a PDF file with some elements. One of these is a table which is supposed to be centered.
    In this table 2x2 with input form a Servlet. This input is a string of variable length, in other words I do not know the length of it.
    I want this table to automatically adjust the cells width according to the length of the String. As I understand iText does not posess this functionality.
    This is how I have created the table: The first column has a width of 0.3 because the values in those I allready know. The default value is centered and 80% span, and because of this the table is not centered according to the text since the content contains empty space, but the 80% span table is centered.
    PdfPTable table = new PdfPTable(2);
    float[] widths = { 0.3f, 0.8f };
    table.setWidths(widths);How could I calculate this? The string has a font size of 22pt. Could I check for the number of chars in the String and adjust the width accordingly? It seems like I need to set the table.setWidthPercentage(50) in addition to the width size. But if I dont know the relationship between the width and percentages.
    If I calculate the width to be 0.6f with font size 22 and length x, how much percentages should I use?
    Message was edited by:
    DJ_Viking
    Message was edited by:
    DJ_Viking

    You need to use FontMetrics. In particular, use the FontMetrics of the table's renderer component so the string width will be calculated correctly even if the cell's value is bold. Something like this:
    Component comp = table.getDefaultRenderer(Object.class).getTableCellRendererComponent(table, cellValue, false, false, row, column);
    FontMetrics fm = comp.getFontMetrics(comp.getFont());
    int cellWidth = fm.stringWidth(cellValue);
    table.getColumnModel().getColumn(column).setWidth(cellWidth);

  • First row trouble with datagrid component

    Dear all,
    I think my question is entirely explained in the topic
    summary of this post. I have a datagrid that uses a item renderer.
    The main app is defined like in the first part of the attached
    code. The itemrenderer looks like the second part of the attached
    code.
    When I run it, the first item of my dataprovider is not shown
    while the first line of my datagrid is always empty... Any idea to
    explain this strange behavior ?
    Thanks in advance...

    Hi WAV;
    You might have better luck posting over in the Front Row Forum.
    Allan

  • Trouble with webmail - left navigation column not visible???

    Email visible, but left navigation column to compose, inbox, options, etc. not visible.  Any suggestions?

    Having same EXACT problem.  Whazzupp?

  • 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.

  • Locking middle or last column in a datagrid

    Does anyone know how to lock say the middle or last column in
    a datagrid. What i really need is for the first and fifth column to
    be locked in a datagrid or Advanced datagrid. Is this possible or
    do i need to put two datagrids next to each other and try to sync
    the vertical scroll??
    Thanks,
    -Jay

    >>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.

  • How to stop table columns widths from drifting

    I discovered that all the columns widths of my tables change on their own,
    leading me with tables of different columns widths where I wanted to
    maintain a strong cohesion of presentation among them.
    Here is a scenario to reproduce and understand the problem:
    • create a new Pages'08 document;
    • insert a Table;
       the 3 columns of this newly created table are 5.49 cm width each.
    Problematic case:
    • change the first column width with:<pre> Table > Table > Column Width > 5 cm</pre>   and hit return
    • the column width will switch to 5.01 cm
    • the 2 other columns widths will have switched to 5.50 cm.
    Is there a technique, I didn't find yet, to define a table column to a
    fixed value so that Pages'08 won't make it drift and wont touch to
    other columns width?
    <pre>--------
    As long as you'll see students making graphics with pen on paper,
    you'll see the missing keystone of the software empire.
    dan</pre>

    Peter, Fruhulda, thank you for your analysis and confirmation.
    PeterBreis0807 wrote:
    daniel
    I have noticed the same thing and have given up on it.
    It's a mess.
    I can't say it more politely .
    Let Apple know:
    -> https://bugreport.apple.com/
    <pre>--------
    As long as you'll see students making graphics with pen on paper,
    you'll see the missing keystone of the software empire.
    dan</pre>

  • Need custom column widths in Append Text Table to Report

    I need to print reports with tables of different column widths specified for each column, as the contained fields vary in width from just 3 characters in one column to 40 characters in another.  Also we are trying to match the reports generated by a non-labview routine.  In the past I have been able to achieve this by editing the Append Table to Report vi, working my way through the inner hierarchy to replace the DBL numeric COLUMN WIDTH control with a DBL numeric array.  The innermost vi, Set Table Column Width, assigns the numeric to a property node in a for loop, so the change is simple: replace the scalor with an array and enable indexing on the for loop.  Of course, after each Labview upgrade, I've had to go back in and repeat these edits on the overwritten upgraded vi's.  This time there is a problem.  The new version of this toolkit is object oriented, and disturbing these vi's wrecks the class methods in a way I don't understand (mostly because I've had no dealings with object oriented programming) and which cannot be undone.  I recently tried this and after not being able to fix the problem even with phone support, I had to spend the next two days unistalling and reinstalling Labview!  I desperately need a way to achieve this functionality without killing the toolkit, which is used (in its original functionality) by another absolutely critical program.  PLEASE HELP!
    The hierarchy is as follows:
    NI report.lvclass:Append Table to Report (wrap)
    NI report.lvclass:Append Table to Report 
    NI Standard report.lvclass:Append Text Table to Report
    NI Standard report.lvclass:tables
    NI Report Generation Core.lvlibet Table Column Width

    There is a highly relevant thread under discussion here:
    http://forums.ni.com/ni/board/message?board.id=fea​tures&thread.id=429
    You may wish to read it and chime in as it is a discussion of LabVIEW's policy (and possible change in policy for the future) concerning the handling of non-palette VIs between LV versions.
    Rob Hingle wrote:
    > Is that to say NI will not be helping me with this?  Pretty disappointing lack of support, seems
    > like a terrible idea to go to object oriented if even your own application engineers can't figure
    > out such a simple fix.  Gotta give NI a huge thumbs down on this one, thanks for nothing.
    I doubt that it is a simple fix -- our AEs are generally top notch at figuring out solutions for customers -- if it were simple, my bet is they'd have solved it. Asking an AE to work around a bug is different from asking them to rearchitect the toolkit. You are asking them to add a feature that the new version of the toolkit is not
    designed to support. The difficulty in doing this is completely independent of the decision to use LabVIEW classes to implement the toolkit. If any piece of software is not designed with a particular use case in mind, what may be a simple tweak under one design may become a very hard problem under another design.
    In your case, the solution is very straightforward: Use the older version of the toolkit. Any time you create a custom modification of the VIs that ship with LV or one of its toolkits, you should make your own copy and have your VIs link against the copy. LabVIEW promises to maintain all the public functionality version over version. Usually we succeed at that. What we do not promise is to maintain our private implementation of that functionality. It is impossible for LabVIEW (or any other software library) to maintain all of its private internal operations while still continuing any development. Using a copy of the original VIs shields you from having to recode your changes every version (something you've already mentioned is a chore) and it guarantees that functionality that you relie upon does not disappear.
    I hope you are willing to be understanding of this situation and not hold it against the AEs working on this. They try hard to provide excellent customer service, and spend lots of time inventing custom solutions for our users.  This happens to be a situation where the correct fix is not to modify the new toolkit version to do something it wasn't designed to do but to modify your development process so that the problem is solved now and into the future. 

  • Spark DataGrid with Dynamic Column Width

    Lets suppose I have a Spark Datagrid with no explicit typicalItem. When the Datagrid is initialized, the column widths are calcualted correctly based on the contents of the dataprovider. However if I add/remove an item from the dataprovider, or modify the one of the objects in the dataprovider, the column widths never update to reflect the change. Is the the correct behavior for a DataGrid? If so, is there any method I can call to force the DataGrid to recalculate and redraw the column widths?

    When Spark DataGrid doesn't have a typicalItem, it uses the first dataProvider item as the typicalItem.  If you change that, the DataGrid won't pick it up immediately. You can invalidate the current typicalItem using dataGrid.invalidateTypicalItem().

  • Changing dataGrid column width with actionScript

    Having a strange change when trying to change any dataGrid column width with this code:
    dataGrid.columns[ 5 ].width = 200;
    It do changes the width of column number 6 to 200, but strangely it's also changes the width of the preceding columns (0-4). Every preceding column automatically increases a little bit than its' existing width without having me any idea.
    Any idea anyone have!
    Thanks..!
    SK

    Hi,
    See if this thread helps:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=585&threadid=1237299
    Cheree

  • Trouble with column width

    Hi,
    I'm having trouble changing the width of a column in my SQL Report. I went into Report Attributes and clicked on Edit for the column I wanted, and entered a value for width in column attributes section, but it didn't work. I also tried an html tag, but that didn't work either.
    Is there a different way to change the column width that I haven't tried yet?
    Thanks,
    Nora

    I'll jump on the trail of this thread. I'd like to use a substitution string in the CSS Style setting of the Column Formatting section of a report column. I'm attempting to use the <ampersand><period> syntax, but it doesn't appear to be working. I have succesfully used a substitution string in the "Number/Date Format" which is in the same section. Can someone confirm that this is possible or not? I have not seen any threads stating this to be true or not.

  • 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

  • Ragged right with Flat file in SSIS for last column

    When I am importing from Flat file to OLEDB using DATA flow in SSIS,
    It has fixed length  for each column
    but last column had length of 20
    So I used for last column as {LF} and input width 0 & output width 20
    but facing problem of last column has showing more data in preview so I am missing some some records
    May I get any  solution
    Thanks

    Hi Madhu,
    I totally agree with Visakh. If your row delimiter is {CR}{LF}, you need to consider the two placeholders for the delimiter when defining the column length, that is to say you need to set the length of the last column to 22.
    Regards,
    Mike Yin
    TechNet Community Support

Maybe you are looking for

  • Network-related or Instance-specfic error when attempting remote connection from SSMS

    Hello, I have installed SQL Server express on a Win7 desktop and want to connect to it via SSMS on a laptop. I have set up a SQL login on the desktop so I can login, but when I try to connect to the instance from the laptop via SSMS I get the error 2

  • Error loading plugins CC 2014

    I have build a plugin with AI SDK CC 2014 on Win 7. But the plugin cannot be loaded by one customer (CC2014 18.1.0, Win7 ultimate 64-bit).  Only a message pops up with 'Error loading plugins xxx.aip'. The plugin works fine on other machines with the

  • .mov from HD vidcam doesn't show all frames in QT

    Just bought an HD videocam with SD card storage. The movies import to my Mac in .MOV format. When I play them in QT Pro the sound is fine but the video is VERY choppy, freezing the image for several seconds at a time while the audio plays on. Any ide

  • Causing a Report page to be opened in Excel or MS Word

    Hello Every body I want to redirect an HTMLDB Report page to an excel spread sheet or MS Word in read only mode and with an order to directly send content to printer. Can any body tell me how to procede ? thanks in advance sidaty

  • Ok_code for next_line

    Hi Everybody, Can any of you experts tell me the ok_code for next line  in table control. thanks, Rajesh K. Moderator message: Welcome to SCN! Moderator message: please search for available information before asking. [Rules of engagement|http://wiki.