How to change one cell's backColour in DataGird.

how to change one cell's backColour in DataGird.who can tell
me how to do?Thangks

Hi,
You may need to use custom skin for that.
-Arun

Similar Messages

  • Can a link only change one cell in a table?

    I've been learning Dreamweaver from a textbook, but I'm still pretty new to it, and I'm not sure what terminology to use here.  I want my site to have a link that just changes one cell in a table when you click the link, rather than having it go to a whole new page.  For example, you click a link and a picture changes but the rest of the site stays the same.  So far, I've been doing this by just making several duplicates of an html file, and then just changing that one cell in each copy.  It works, more or less, but then whenever I want to make a change to my page, I have to make the same change in all the copies.  There's got to be a better way, right?
    If this is too complicated to explain in a forum, perhaps someone could just tell me if there's a term for what I'm trying to do, and then I can just look for it in my book or search for it online.
    Thanks for your help.  Oh, and the version I'm using is CS5.

    What you are asking for is called a 'disjoint rollover', which means 'something happens over here, and the effect is seen over there'. It's simple to do even manually. Take a look at this page -
    http://www.murraytestsite.com/locrian.html
    The code on the page is this -
    <!doctype html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Untitled Document</title>
    </head>
    <body>
    <p><a href="#" onclick="document.getElementById('image').src='_img/masthead-logo1.jpg'">link</a></p>
    <table width="347" border="1">
      <tr>
        <td>  </td>
        <td>  </td>
        <td>  </td>
      </tr>
      <tr>
        <td>  </td>
        <td>  <img src="_img/masthead-logo.jpg" width="347" height="120" alt="" id="image"/></td>
        <td>  </td>
      </tr>
      <tr>
        <td>  </td>
        <td>  </td>
        <td>  </td>
      </tr>
    </table>
    </body>
    </html>
    I used a table because you specifically asked about tables, but I wouldn't recommend using them for anything other than tabular data, and certainly not for general layout. The code could be re-written like this to completely eliminate the table -
    <!doctype html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Untitled Document</title>
    </head>
    <body>
    <p><a href="#" onclick="document.getElementById('image').src='_img/masthead-logo1.jpg'">link</a></p>
    <div><p><img src="_img/masthead-logo.jpg" width="347" height="120" alt="" id="image"/></p></div>
    </body>
    </html>
    Better, huh?

  • How to change Table Cell Field Type Dynamically?

    Hi All,
    I am fetching some news data from backend DB and displaying them in a WD Table. Now one News Item may or may not have a URL behind it. If I find the URL as null then I want to display the news as simple TextView otherwise as LinkToUrl. How can I change this input type dynamically for each row in the runtime?
    If I use LinkToUrl all the time then the items which has URL as null gets displayed as normal text, but they are of very faint color and I can not change the text design. Whether if I user TextView I can set some text design like Header2, Header 3 etc.
    Can anybody please help with some code block? My main requirement is how to change the table cell input type dynamically.
    Thanks in Advance.
    Shubhadip

    Hi Shubhadip,
    This is the sample code for creating and adding a table cell editor table dynamically.
    public static void wdDoModifyView
    (IPrivateDynamicTableCreationView wdThis, IPrivateDynamicTableCreationView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
    //@@begin wdDoModifyView
    /*** 1.Create Table **/
    IWDTable table =
    (IWDTable) view.createElement(IWDTable.class, "table1");
    table.setWidth("100%");
    table.setVisibleRowCount(data.length);
    /*** 2.Create nameColumn **/
    IWDTableColumn nameColumn =
    (IWDTableColumn) view.createElement(IWDTableColumn.class, "Name");
    IWDCaption colHeader =
    (IWDCaption) view.createElement(IWDCaption.class, "NameHeader");
    colHeader.setText("–¼‘O");
    nameColumn.setHeader(colHeader);
    IWDTextView nameViewer =
    (IWDTextView) view.createElement(IWDTextView.class, "NameViewer");
    nameViewer.bindText(nameAtt);
    IWDTableCellEditor editor = (IWDTableCellEditor) nameViewer;
    nameColumn.setTableCellEditor(editor);
    table.addColumn(nameColumn);
    IWDTableColumn nationalityColumn =
    (IWDTableColumn) view.createElement(
    IWDTableColumn.class,
    "Nationality");
    IWDTableCellEditor nationalityEditor =
    (IWDTableCellEditor) nationalityViewer;
    nationalityColumn.setTableCellEditor(nationalityEditor);
    table.addColumn(nationalityColumn);
    /** 3. Bind context to table **/
    table.bindDataSource(nodeInfo);
    //@@end
    Bala
    Kindly reward appropriate points.

  • PLEASE HELP-JTable cell editor-change one cell, changes all cells of column

    for example i have 3 rows 4 columns, column 3 and 4 are dates. now if i change the date to a new value (eg for of column 3)
    for any row, and then i click on any other cell. All cell values ie all rows for that column are changed to that new value.
    ie it changed column 3 for all rows 1, 2 and 3 to that new value which i changed in only one cell of that column.
    PLEASE HELP me , tell me what change i make to the code to fix it ....
    this is my cell renderer for date
    class DateCellRenderer extends JbcDateTimeChooser implements TableCellRenderer {
      protected Border m_noFocusBorder;
      public DateCellRenderer() {
        super();
        setStylePattern(JbcDateTimeChooser.MEDIUM);
        m_noFocusBorder = new EmptyBorder(1, 2, 1, 2);
        setOpaque(true);
        setBorder(m_noFocusBorder);
      public Component getTableCellRendererComponent(JTable table,
       Object value, boolean isSelected, boolean hasFocus,
       int row, int column)
      if(value instanceof Date) {
          Date b = (Date)value;
          setDate(b);
        setFont(table.getFont());
        setBorder(hasFocus ? UIManager.getBorder(
          "Table.focusCellHighlightBorder") : m_noFocusBorder);
        return this;
    }I have this custom cell editor date
    class DateCellEditor extends AbstractCellEditor implements TableCellEditor {
      protected JbcDateTimeChooser editor;
      public DateCellEditor() {
        super();
        editor = new JbcDateTimeChooser();
        editor.setStylePattern(JbcDateTimeChooser.MEDIUM);
      public Object getCellEditorValue() {
        return editor.getDate();
      public Component getTableCellEditorComponent(JTable table,
       Object value, boolean isSelected, int row, int column)
        if(value instanceof Date) {
          editor.setDate((Date)value);
        return editor;
    }and this is how i defined in jtable
        lnnTableModel = new CellSiteLNNTableModel();
        lnnTable.setModel(lnnTableModel);
        lnnTableModel.addColumn("ABC");
        lnnTableModel.addColumn("DEF");
        lnnTableModel.addColumn("Date From");
        lnnTableModel.addColumn("Date To");
        for(int k = 0; k < lnnTableModel.getColumnCount(); k++) {
          TableColumn col = lnnTable.getColumn(lnnTableModel.getColumnName(k));
          TableCellRenderer renderer;
            DefaultTableCellRenderer textRenderer = new DefaultTableCellRenderer();
            renderer = textRenderer;
          TableCellEditor editor;
          JTextField textColumn = new JTextField();
          if((k == CellSiteLNN.DATE_FROM) || (k == CellSiteLNN.DATE_TO)) {
            editor = new DateCellEditor();  //  this is the cell editor
         renderer = new DateCellRenderer(); // this is the assigned cell renderer
          } else {
            editor = new DefaultCellEditor(textColumn);
          col.setCellRenderer(renderer);
          col.setCellEditor(editor);
        }

    table model is extended from AbstractTableModel
    and have these methods
    do you see anything wrong here.....
      public Object getValueAt(int row, int column) {
        Vector rowVector = (Vector)dataVector.elementAt(row);
        return rowVector.elementAt(column);
      public void setValueAt(Object aValue, int row, int column) {
        Vector rowVector = (Vector)dataVector.elementAt(row);
        rowVector.setElementAt(aValue, column);
        // generate notification
        fireTableChanged(new TableModelEvent(this, row, row, column));
      } // end method (setValueAt)

  • How to change one iView to another in portal page by clicking the third one

    Hi all!
    I have created four iViews: two speedometers with web application designer and two iViews with visual composer. I added the speedometers and a visual composer iView #1 to a portal page (default view). The requirement is that by clicking the speedometer #2, the visual composer iView #2 would replace visual composer iView #1 on the portal page. If the user then would select the speedometer #1 again by clicking it, visual composer iView #2 would replace #1 again and so on.
    I have read article http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50b65a5d-f397-2910-a78a-f5544f21c33b?QuickLink=index&overridelayout=true, but it is more about filtering VC iView values with BI web items. I don't need to filter anything, just to change one iView to another in a portal view by clicking a third one.
    I have thought of placing two VC iView to a same portal page area and defining one of the to be visible and another hidden (by clicking speedometers these properties would change), but I haven't found the way how that could be done in portal. Is there a way to define some OnClick-method to change visibility parameters or url-address of another iView?
    One solution might be¨on the other hand to transfer any value to VC by clicking a speedometer and to change the visibility of the VC iViews according to that value (the speedometer #1 should in that case transfer other value to VC than speedometer #2). I don't know if that is possible with speedometers - you can't reference any characteristics or variables with it.
    If you have an idea, what would be the best way to accomplish this requirement, I would be very glad to hear about it! We are in VC 7.0.
    Points garanteed!
    Regards
    Sari

    Hi,
    In the portal, create a page and place the iView having the three input fields on top. Place the second iView below. Keep differing the second iView for every page. In this way you can make the iView with 3 input fields only in the desired pages. You can use EPCF to invoke / navigate to another iView.
    Regards
    Srinivasan T

  • How to change one character string to char

    hi all
    i got string but only one character
    i got 1,2,3,E
    since i got 'E' here..........
    i need to convert to it to character....
    but how to change it.... i only know String to integer using Integer.parseInt() method....
    but i don't know about char...................

    You should really check the API first:
    http://java.sun.com/j2se/1.4.2/docs/api/index.html
    Take a look at String.charAt(int index) method.
    /Kaj

  • How to change the cell value in Excel Sheet in WD Java?

    HI,
    I have an application which is used to upload and download excel sheet.I can upload the excel sheet through Upload UI element and also able to download the same file through Download UI.But before download I want to validate the excel sheet.If data is not proper in the excel then I have to put some comment (cell comment).I am able to read each cell value,but not ble to put any comment.Once I pt commen in the cell,the download file should display the commented in the excel sheet.
    Please let me know how to update hte excel sheet.
    Sandip

    hi Sandeep,
    I'm not sure about the HSSF apis, however, i inserted the Cell Comments using jexcel apis. There is a method setComment(java.lang.String s, double width, double height) in class WritableCellFeatures using which you can insert cell comments
    For more details refer [link|http://jexcelapi.sourceforge.net/resources/javadocs/current/docs/jxl/write/WritableCellFeatures.html]
    Abhinav

  • How to change one of the fields in the infoset

    Hi,
    I created a query and infoset using sq01,sq02 transaction i have Cost Center field in the query that is pointing to P0001-KOSTL.
    when i execute the query by giving the cost center criteria ,query is getting executed on the Local Cost Center .But i want that to be executed on Global Cost Center.
    Does Cost Center point to Local Cost Center only.How will I change it to point to Global Cost Center
    Thanks
    Bala Duvvuri

    Bala,
    Your question is not clear. Cost center is maintained on employee infotype 0001 (home cost center) or in infotype 0027. If the selection criteria is on costcenter field on IT 0001 then query will filter based on that.
    thanks
    Sridhar

  • Change one sound in Ultrabeat

    Does anyone know how to change one sound (voice) opposed to an entire preset of sounds in Ultrabeat? Say you have a preset loaded but you would like to change out the kick drum for one that resides in another preset. If I click on the Import button it opens up a browser for the presets as a whole. If I click on the dropdown arrow next to the import button, I get a long column with the wording "new voice" next to each of the 25 voices but I cant figure out from there how to change one idividual voice (sound). Is this even possible? The manual also says to control click on the name to change it but this appears to only rename it.
    Thank you very much

    I have clicked on the import button and gotten a browser to entire presets. I have clicked on the arrow next to import which shows the column with "new voice" next to each. Ive tried clicking on these and nothing happens. DO you right click, control click...?? btw is right and control along with clicking set up somewhere in logic. sometimes I do these per something in the manual and they dont work. I dont know if they are setup properly. Also I know for sure right clicking doesnt give me a secondary tool. I got a feeling this has to do with me not able to change sounds in Ultrabeat. Also I have 7.2...
    Thanks

  • How to make a cell populate the same as other cells mac numbers

    does anyone know if theres a command where I can make a cell be the same value as another cell? so i change one cell and it populates the same in others. Thanks!

    Hi appleryan,
    =A1
    in any cell will bring the value of A1 into that cell.
    quinn

  • Formula to deduct one cell from another cell - simple equation - cant find the answer, formula to deduct one cell from another cell - simple equation - cant find the answer

    Could anyone tell me how to deduct one cell from another cell in the numbers application.
    Thank you!

    to subtract one cell from another you enter a formula in a cell by:
    1) click the cell where you want the result to be
    2) click the cell that contains on of the operands
    3) type the minus sign ("-")
    4) click the other cell with the other operand
    e.g.  if cell A1 contains 5, cell B1, contains 2 and you want the difference of those two cells to be in cell C1....
    you would click cell C1 and then type: "=A1-B1" then type the enter key OR
    click cell C1 and then type "=", then click cell A1, then type "-", then click cell B1, then type the "enter" key

  • How can I paste a part of a sheet from Numbers in Pages as text, without the formulas.The reason I need this (and was used to in Office) so that I have the freedom to delete something in one cell (in pages document) without causing changes.

    How can I paste a part of a sheet that I copied in Numers in a pages document without the formulas, simply as text. Used this a lot in Office. When I make some changes in the pages document. f.i. deleting a cell, I don't want to change other cells. Also when I copy a part of a sheet from Numbers and one of the cells that is part of the formula is not also copied, when I paste in Pages it shows as an error.
    Hope that You can me help with this.

    Leon,
    There are two solutions to the first question, narrowing to one solution when you have a broken link causing an error.
    Here's the "works always" solution.
    Copy (Command-C) the table or range in Numbers
    Click off the table on the blank canvas of the sheet.
    Edit > Paste Values
    Command-C
    Switch to Pages
    Command-V
    Regards,
    Jerry

  • How can I change the coIor of one cell in a JTable

    Hello,
    I need to change the colours of the cells in a table. The problem is that when I try to change the colour of a one cell the colour of entire column is changed. See the way that I tried to use.
    TableCellRenderer cr = table.getCellRenderer(row, col);
    if (cr instanceof DefaultTableCellRenderer) {
        ((DefaultTableCellRenderer)cr).setBackground(bgColor);
    ......Please let me know if you have any suggestion
    Thanks a lot
    Jan

    try this ...
    In ur table call this
    ColorRenderer cell=new ColorRender();
    // for(int i=0;i<table.getModel().getColumnCount();i++){
    // TableColumn mod=this.getColumn((this.getModel().getColumnName(i)));
    mod.setCellRenderer(cell);
    And ur ColorRender calss should override DefaultTableCellRenderer like this
    class ColorRenderer extends DefaultTableCellRenderer {
    protected int align;
    public ColorRenderer(int align) {
    this.align=align;
    public Component getTableCellRendererComponent(JTable table,
    Object value, boolean isSelected, boolean hasFocus, int row,
    int column) {
    setHorizontalAlignment(align);
    super.getTableCellRendererComponent(table, value, isSelected,
    hasFocus, row, column);
    if(col==4){
    setBackground(Color.cyan);
    return this;

  • I want to programmtically change the font of one cell at a time in a LabVIEW table

    I want to programmtically change the font of one cell at a time in a LabVIEW table. How would I do this. I know it is possible to change an individual cells font properties on the front panel but I want to do it via the diagram (code).

    You are able to change each cell's background and foreground (text) color, but it seems the ability to specify font information with properties is lacking in both 6.1 and 7.0.
    Daniel L. Press
    PrimeTest Corp.
    www.primetest.com

  • Hi it's me rabia and i'm apple user  I want to change my cell phone because it's having scratches on it and i also feel like its home button did't work correctly  So i want to know that can i have a new cell phone on replace of this one at any nearby of m

    Hi it's me rabia and i'm apple user
    I want to change my cell phone because it's having scratches on it and i also feel like its home button did't work correctly
    So i want to know that can i have a new cell phone on replace of this one at any nearby of my house App store without any cost  ?
    But i'm not having any line yet on my phone i use it on net mostly so what is the scene can i have or can't ??
    please inform me soon !

    Is your phone still covered by warranty?  If so, go to your nearest Apple store and depending on what happened, this may or may not be covered by warranty.  If it is, then you can get a replacement exactly as the phone you already have.
    If out of warranty, then there is nothing you can do and you'll have to pay.

Maybe you are looking for

  • Problem in Creating New partition in Pavilion dm4 1217TX

    I have a hp Pavilion dm4 1217TX model laptop. I want to partition the hard disk (640GB) to separate the OS to the data. I think this is a very basic safety feature that will save my data in case of Windows failure (which is a very common problem).

  • Watching Rented Itunes Movie on Multiple Desktops

    If I download a rented movie from Itunes onto my desktop PC but I also have an Imac in the house is it possible to watch that same movie on the Imac even though it was downloaded on the PC?  Thank You.

  • Important Enhancements in SRM classic Scenario implementation.

    Hi Experts, We are going to plan SAP-SRM imlementation with Classic Scenario. Please provide important enhancements that are need in general and their requirement and usage. Also please suggest, how to start and follow in implementation step by step.

  • Extractor issue

    Hi Gurus I am checking the values in the faglflext, when trading partner is posted with the journal entry, the posting period is 16 (where i am posting in this period , so i need the period to be 11 ). while i check the same entry in faglflexa the tr

  • In RH7html, files are suddenly read only

    We use RH7 html and VSS version control. I have opened an old project and had some issues trying to get it versioning correctly. when I opened the project just now, all my htm files (topics) are 'read only', so every time I want to change something a