Images in Table cell

HI,
I have to display different images in a SAP .Net tabe control cell depends on the field values from a database. I set the Tabel cell editor property to "Image Instance" and programatically assign the relative path of the image "web resourcesimagesxxx.gif" according to the database field values. I can see at runtime the web source have correct URL to the image source but the image is not getting displayed on the iView. What am I doing wrong?? I follow this article to do the code part
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/nw/dotnet/pdk for .net faq - .net controls.faq
Please help.
thanks

Thanks for the reply guys,
Here is the code; I'm not using server "itemDtaBound"
I set the field type as "image instance" at design time and at runtime after reading the data assign the graphics to the control according to the value returned from the database at the Page_Load
I only took the relevant portion
        Dim sOrderByField As String = ""
        Dim sqlDate As String = FormatDBDateTimeSQL(Format(Now, "MM/dd/yyyy 00:00:00"))
        'Dim ConnStr As String = "server='(local)'; trusted_connection=true; database='tllink'"
        sSQL = "SELECT EmployeeName, BadgeId, Punch_Type,Punch_Date, Punch_time, TerminalID FROM TERMINAL_TRANSACTIONS"
     sSQL &= " WHERE (Punch_Date =" & sqlDate & ") AND (Punch_Type IN ('IN', 'OUT' ,'DEPT' )) AND ((CAST(Punch_Time AS VARCHAR) + '-' + BadgeId) IN"
        sSQL &= " (SELECT (CAST(MAX(PUNCH_TIME) AS VARCHAR) + '-' + BADGEID) FROM TERMINAL_TRANSACTIONS"
        sSQL &= " WHERE  (Punch_Date =" & sqlDate & ") GROUP BY BADGEID))"
rRec = g_cDB.GetRec(sSQL, , True)
OleDbDataAdapter1.Fill(dSQLSet,rRec, "TERMINAL_TRANSACTIONS")
        'SQLTable = dSQLSet.Tables(0)
        Dim RowCurrent As DataRow
        Dim tr As SAP.Web.UI.Controls.TableRow
For Each RowCurrent In dSQLSet.Table("TERMINAL_TRANSACTIONS").Rows
            tr = New SAP.Web.UI.Controls.TableRow
            If IsDBNull(RowCurrent("EmployeeName")) = False Then
                tr.Cells.Add(New SAP.Web.UI.Controls.TableCell(New TextView(RowCurrent("EmployeeName"))))
            Else
                tr.Cells.Add(New SAP.Web.UI.Controls.TableCell)
            End If
            If IsDBNull(RowCurrent("badgeid")) = False Then
                tr.Cells.Add(New SAP.Web.UI.Controls.TableCell(New TextView(RowCurrent("badgeid"))))
            Else
                tr.Cells.Add(New SAP.Web.UI.Controls.TableCell)
            End If
            If IsDBNull(RowCurrent("Punch_Type")) = False Then
                If RowCurrent("Punch_Type") = "IN" Then
                    tr.Cells.Add(New SAP.Web.UI.Controls.TableCell(New SAP.Web.UI.Controls.Image("Web Resources/Images/in.gif")))
                ElseIf RowCurrent("Punch_Type") = "OUT" Then
                    tr.Cells.Add(New SAP.Web.UI.Controls.TableCell(New SAP.Web.UI.Controls.Image("Web Resources/Images/out.gif")))
                Else
                    tr.Cells.Add(New SAP.Web.UI.Controls.TableCell(New SAP.Web.UI.Controls.Image("Web Resources/Images/transfer.gif")))
                End If
       End If
       Me.DataTable.Items.Add(tr)
Next
My table displays the employee name and badge id but the images are coming as broken link. I added the images to the web resources before deploying the par.
The follwing is the runtime source from the browser
</td></tr><tr rr="1"><td tableid="tae241ba0_DataTable" cc="0" rr="1" class="urSTTD urSTTDBdr1" style="padding:0;"><div tabindex="0" ti="0"><span ct="TextView" style="margin:0px;"></span></div></td><td tableid="tae241ba0_DataTable" cc="1" rr="1" class="urSTTD urSTTDBdr" style="padding:0;"><div tabindex="0" ti="0"><span ct="TextView" onkeydown="sapUrMapi_TextView_menuActivate('',event)" class="urTxtStd" style="white-space:nowrap;">000000000003412770</span></div></td><td tableid="tae241ba0_DataTable" cc="2" rr="1" class="urSTTD urSTTDBdr" style="padding:0;"><div tabindex="0" ti="0"><img class="urImg" src="/irj/portalapps/Timelink_Portal_APP/Images/green.gif" ct="Image" border="0" style="height:28;width:30;"></img></div></td><td tableid="tae241ba0_DataTable" cc="3" rr="1" class="urSTTD urSTTDBdr" style="padding:0;"><div tabindex="0" ti="0"><img class="urImg" src="/irj/portalapps/Timelink_Portal_APP/Images/in.gif" ct="Image" border="0"></img></div></td><td tableid="tae241ba0_DataTable" cc="4" rr="1" class="urSTTD urSTTDBdr" style="padding:0;"><div tabindex="0" ti="0"><span ct="TextView" onkeydown="sapUrMapi_TextView_menuActivate('',event)" class="urTxtStd" style="white-space:nowrap;">2/10/2006</span></div></td><td tableid="tae241ba0_DataTable" cc="5" rr="1" class="urSTTD urSTTDBdr" style="padding:0;"><div tabindex="0" ti="0"><span ct="TextView" onkeydown="sapUrMapi_TextView_menuActivate('',event)" class="urTxtStd" style="white-space:nowrap;">07:24:58</span></div>
as you can see it includes the path to th images green.gif and in.gif
thanks

Similar Messages

  • Displaying of image in table cells

    Hi,
    I have a requirement where i need to display an image in table cell editor. Can anyone please tell how to do this.
    Thank You,
    Madhavi

    Hi
    The link is related to the same code as well..
    First copy all your images into "project/src/mimes/components/<packagename>"
    1) First create a new column for image and insert Child "Image" UI Element
    2) Create a Context in a view in which you are using Image UI Element
    3) Value Node
    Name : Image
    Cardidality : 1..1
    4) create 2 Value Attributes
    4)a ImageAlt (Calculate property - true)
    4)b ImageSrc (Calculate property - true)
    5)Bind the properties of Image
    alt - Image.ImageAlt
    source - Image.ImageSrc
    6) in getImageSrc()
    //according to your condition use your image
    retrun "XX.gif"
    7) in getImageAlt()
    return "Image Not Available"
    Case 2 :
    1) Add a new String attribute to your existing context
    2) Right click on your table in RootUIElememntContainer
    3) Edit Sturcture Binding
    4) Select the context which you modified , Select next
    5) in the next step for the newly created attribute select imageUIElement as type
    If you want to use that in wdDoinit()
    bind the two string value attributes to alt and source properties of ImageUIElement and write the following code
    in doinit
    wdContext.currentContextElement.set<src>("img1.gif") ;
    wdContext.currentContextElement.set<alt>("Image not found") ;
    Best Regards
    Chaitanya.A

  • Add image to Table cell

    Hi All,
       Based on condition how can i add image to Table cell.

    Hi,
    Its very simple and straightforward.
    All you need to do is:
    1...Create a context(value attribute) of type string.
    2...I am assuming that you have created a table, and mapped its columns with a node.
    3...In the <i>TableCellEditor</i>  of your desired column, map the above context with the <i>imagesource</i> property.
    4...In the code, set the value of this context to the image name(eg: abc.gif), on satisfying of a condition.
    5...However, keep in mind to set the context value to some default blank image in the doinit() of the view, else, you will get a null pointer exception.
    I hope this solves your problem.
    Keep posting if you have any further queries.
    Regards,
    Hanoz

  • What's the best way to place images in table cells?

    I'm working on a basic tooling catalog/list using a table for all of the information.  One of the columns is for an image of the tool.  Is there a way to place each image in a cell and have it resized to fit the cell dimensions (including my text inset settings)?  I'm using CS4 and the images are all tiff files, although I also have psd files of each.  Any suggestions would be appreciated.

    Table cells don't adjust automatically except in the vertical direction when set to "at least" some dimension, and I suspect you don't really want that anyway. Keep in mind that column width is constant through the whole table, so fitting the cell to the largest image is going to give you a giant coumn width that isn't used for smaller product shots in the same table.
    What about making an image frame the size you want, and setting the fitting options to fit proportionally? Copy that frame and paste into the cell, then place the image in the frame.

  • Background Image In Table Cell

    I'm not sure what I'm doing wrong or missing here. This is the first time that I'm using an image as a background. I've made a table with a 100% width with 3 colums and 3 rows. The left and right table cells have been merged and the 3 middle rows are at a width of 938 pixels. I have cropped the images correctly. The right column lines up perfectly, but the left column does not line up like it's supposed to with the image. You can take a look at it by going to http://www.wattsconcepts.com/new
    Here is the code below if anyone wants to take a look at it. Any help in solving this is greatly appreciated. I am using Dreamweaver CS5.5
    Thank you for your time!
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Watts Concepts - Kentucky Web Design - Harrodsburg, Kentucky</title>
    <style type="text/css">
    body {
              margin-left: 0px;
              margin-top: 0px;
              margin-right: 0px;
              margin-bottom: 0px;
              background-color: #000;
              background-image: url();
    </style>
    </head>
    <body>
    <table width="100%" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td rowspan="3" align="left" valign="top" background="images/left-index.jpg"> </td>
        <td width="938" align="center" valign="top"><img src="images/logo-index.jpg" width="938" height="172" /></td>
        <td rowspan="3" align="left" valign="top" background="images/right-index.jpg"> </td>
      </tr>
      <tr>
        <td align="center" valign="top"><img src="images/eye-index.jpg" width="938" height="296" alt="Reach Your Audience Today" /></td>
      </tr>
      <tr>
        <td align="center" valign="top"><img src="images/test-index.jpg" width="938" height="197" /></td>
      </tr>
    </table>
    </body>
    </html>

    Your HTML code should ideally be as follows:
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Watts Concepts - Kentucky Web Design - Harrodsburg, Kentucky</title>
    <style type="text/css">
    body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    background-color: #000;
    </style>
    </head>
    <body>
    <table width="938px" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="938" align="center" valign="top"><img src="images/logo-index.jpg" width="938" height="172" /></td>
      </tr>
      <tr>
        <td align="center" valign="top"><img src="images/eye-index.jpg" width="938" height="296" alt="Reach Your Audience Today" /></td>
      </tr>
      <tr>
        <td align="center" valign="top"><img src="images/test-index.jpg" width="938" height="197" /></td>
      </tr>
    </table>
    </body>
    </html>
    Also, you don't need 3 columns for this website. 1 column and 3 rows should do. Also, never use 100% for <table> width. It's bad practice as you're making your site fluid which will render your site to malfunction on some browsers
    And you had the entire 3 sections as 1 image as your CSS body background-image. This is bad practice. Crop only what you want for each section, never give the entire merged site as 1 image.
    Try the code I've given you above and it should work perfect.
    A quick tip: Try learning and using DIV with pure CSS styling instead of tables. Tables are a thing of the past. You could just google it and you have tons of free resources on how to create a site using DIV. Also, there's a beautiful tutorial posted by one of our senior members here: http://www.adobe.com/devnet/dreamweaver/articles/dw_html5_pt2.html that explains how to create HTML5 site with Pure CSS styling using DIV tags.
    Cheers,
    ST

  • Place image in table cell in pages for iOS 5

    Can I place an image into a table cell in pages for iphone? This would keep me from having to take my expensive MBA out on the dangerous (for the computer) jobsite.  It would change my life to be able to do this on the iphone as my reports require it.  As of yet I've found no way to do this.
    Thanks in advance for your help!
    ~CR

    Put the text cursor in the cell and use the regual Place command. The image will be placed as an inline graphic in the empty paragraph.

  • Insert shape over image in table cell

    Want to use circles, ovals, lines with arrows to point to some part (text or image) of a cell in a table.
    Need to emphasize certain areas of graphics in a document used as a step by step type document.
    If I add the shape outside the table and then try to drag/drop on to the image in the cell, the entire cell jumps to a new empty cell.
    Can nod get image to appear over the image in the table cell.

    Hello,
    do you think about this, please have a look here: http://help.adobe.com/en_US/dreamweaver/cs/using/WSc78c5058ca073340dcda9110b1f693f21-7b86a .html.
    Another way, to add text over an image uses Nancy O.'s Demo here (I would prefer by using PS or similar):
    http://alt-web.com/DEMOS/CSS-Sold-Out-Text-over-image.shtml
    Hans-Günter

  • How do I get rid of white space on one side of image in table cell?

    I'm making a disjointed rollover and when ever I add images it creates too much white space to the right of the cell.  How can I make the picture fit, so space is not wasted?  See image sample with red arrows where I want to remove space.  I've removed the width size from my table, hoping it would "spring to shape" around the images, but no go.

    HTML:
    Cellpadding="0"
    Cellspacing="0"
    CSS:
    table {border-collapse: collapse}
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Images as table cell content

    Hi,
    we are using thumbnail images for representing some employee status in a table. Images are displayed successfully.
    Problem is the white space between two cells, we want to eliminate the space between two cells. I have tried cell width property but it doesn't help.
    Any other suggestions to achieve this.
    Thanks a lot.
    Rgds

    Hi Sharanya,
    I could not find property cell spacing and cell padding property for cell.
    I am on Nw04.
    Is there other way we can achieve this.
    Rgds

  • Adding Image to table cell

    hello,
    I want to add Image related to particular file to cell of the JTable,
    I already have name of the file in cell but want to display file or directory name with its related icon.
    i am using TableCellRenderer ,but don't know how to keep both filename and icon.
    tell if you are aware of it.
    thanx

    The cell renderer component for the DefaultTableCellRenderer is a JLabel and this has a setIcon() method. You can extend this DefaultTableCellRenderer and inside the getTableCellRendererComponent(JTable table,
    Object value,
    boolean isSelected,
    boolean hasFocus,
    int row,
    int column) method you decide from the parameters which Icon (or ImageIcon) you want to display and then use setIcon() .

  • Left justify images in table cell

    I have just started trying to learn DW.
    Why do some of my images left justify in the cell (as I want
    them to) while others float out in the center of the cell?

    > working and the code that isn't and deleted some code -
    a blockquote tag
    > ? -
    > that seems to have done the trick.
    It certainly would.
    Until you gain some proficiency with HTML and then with CSS,
    your experience
    with DW will be one of these mysteries after another. The
    problem is, that
    knowledge would PREVENT you from clicking on the icon that
    inserts the
    <blockquote> tag (mistakenly identified as an indent in
    DW) in the first
    place, and would then allow you to find it and remove it once
    it has been
    used.
    Good luck!
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "nugentdav" <[email protected]> wrote in
    message
    news:g2anes$ddi$[email protected]..
    >I have not looked at my code, as you pointed out, I need
    to know html and
    >css
    > to really be proficient with this and get the results I
    want.
    >
    > BUT just by your suggestion I made the comparison
    between the code that is
    > working and the code that isn't and deleted some code -
    a blockquote tag
    > ? -
    > that seems to have done the trick.
    >
    > Thanks!
    > Nugent
    >

  • Pages 5.0 removing images from tables.

    After upgrading to Pages 5.0 I now receive a message when opening any file with a table that has images in the cells.  Basically Pages is removing all images from table cells.  Anyone having this problem and is there an easy fix?

    DrBrian, this is what I did to resolve this issue.  I found out that we may still have Pages 09 installed on our systems! Go into Finder - Applications.  If you have a folder titled iWork 09 click it and you may find Pages 09 there.  Double click to open Pages version 09 where you will be able to open all of your files just as they should be. 
    I will not be using the new Pages upgrade.  I have too much time invested in creating documents and templates for my business and I am not willing to re-learn a new package which has much less functionality.  Hope this helps you.

  • Scaling of images in a table cell

    Hi,
    I have an issue aboute the scaling of images in a table cell. The table layout is fixed but the images can vary. I tried to transform the images but every time the transformation matrix has a scaling != 1.0 the function results in an error.
    The following code is used.
    PageItem pi = myCell.getNthChildPageItem(0);
    TransformationMatrix[] matrix = pi.transformValuesOf(kCoordinateSpacesInnerCoordinates.value);
    TransformationMatrix scalemat = matrix[0].scaleMatrix(OptArg.makeDouble(0.5), OptArg.makeDouble(0.5));
    Unit[] matValues = UnitUtils.createDouble(scalemat.getMatrixValues());
    pi.transform(
    enums.kCoordinateSpacesInnerCoordinates.value,
    VariableTypeUtils.createEnumeration(enums.kAnchorPointCenterAnchor.value),
    VariableTypeUtils.createUnitList(matValues),
    OptArg.makeVariableType(VariableTypeUtils.createEnumeration( enums.kMatrixContentScaleValues.value ) ),
    OptArg.noBoolean()
    Any suggestions?
    Regards,
    tom

    Hi!
    You may try to vary the settings for property "type"
    navigation
    function
    reporting
    result
    If this does not help to solve your issue open a ticket at SAP Support.
    There are several UIElements which show such a behaviour and you have no (documented) chance to change this.
    Hope this helps.
    Regards,
    Volker

  • Placing text beside image in a table cell?

    I'm creating business cards (using a Printworks template), and I want to place text to the right of the inserted picture.
    I've copied and pasted the jpg fine onto the left side of the cell, yet when I try to type text, the cursor only lets me begin typing at the bottom right side of the photo, not up at the top right side, where I want the info to start.
    Further, when I try to insert a Text Box into the cell, it won't go inside.
    So, my question: *How do I get image and text together inside a table cell?*

    I made an ultimate test.
    I grouped a jpeg picture and a shape in which I inserted a piece of text. You may see it on the screenshot.
    I inserting the group in the cell hoping that the group will be correctly displayed.
    Nada, only the picture appears.
    If I select the object embedded in the cell, copy it, paste it in an other location, I may ungroup it but the now separated shape no longer contains the original text
    Yvan KOENIG (VALLAURIS, France) lundi 7 juin 2010 17:55:18

  • Can I Place an Image in a Table Cell?

    I have a table in ID CS3. Can I place an image in one, or more than one, table cell? I see a place to manage fills, but don't see an option for images.

    I am working on a calendar project and variously want to: (1) put an individual image in a box, (2) put a continuous image behind more than one box like two dates side by side, (3) put a continuous image in multiple boxes that although they constitute a multiple of boxes, might not be rectangular, (4) put text over any or all of the preceeding.
    I can places gridlines on the page, create text and image boxes for for each date, and the join the images boxes as necessary. Then for the box lines I could use an empty table or I could draw them individually and group them. This would get me what I want. I just thought this might be done easier with a table.

Maybe you are looking for

  • Preview pdf annoying issue

    I have to work with a lot of pdf's, and I prefer the use of preview (it's quick and simple). But a lot of pdf's that have boldface font don't show up right in preview. In Reader, they show up as bold. In Preview, the font style of the word changes (l

  • TNS error after upgrading to 11.2.0.1

    hi i have just upgraded my database from 11.1.0.7 to 11.2.0.1 i have created new listener from netca (new home) on port 1523 which was my earlier port whenever i issue lsnrctl status , it gives error Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=

  • Delete events properly in C#?

    Hey I'm new to C# and I've been told by the instructor that if I want to delete an event I just remove it and when I go back to the design an error pops up, I just double click the error and remove the code from designer. Is there a simpler/cleaner w

  • Source system refresh after initial download

    Hi Group,      i finished my initial download of BP's, Products, Pricing and Org structure from R3 to CRM. now Delta load is active. my client is planning on doing Refresh on R3 system this week. what will happen to CRM after R3 refresh? does CRM sys

  • Ever since I updated to 7.0.4 my iPhone 5 keeps shutting down even when I have 40 or 50% battery life

    This has happens about twice or three times a day. The last time when I took a photo it shut down even though I had 49% battery. When I tried to restart it I got the connect to a power source icon. Then if I wait a few mins I can restart ok and it th