[CLOSED] Grid cell refresh and change column background color

  1. #1

    [CLOSED] Grid cell refresh and change column background color

    Hi Team,

    I am creating grid dynamically in server side.

    I am facing 2 problems in this.

    1) In grid, I have combo box column and one text field column.

    Based on combo box column selection, beside text field column value should change dynamically.

    When I select value from combo box, server side its updating properly, where as in screen its not updating.

    If we refresh the page after selection, then its showing updated data.

    2) How can I change the background color of text field column?

    Please provide the solution.

    Regards,
    Chinni
    Last edited by Daniil; Aug 06, 2013 at 8:23 AM. Reason: [CLOSED]
  2. #2
    Hi @chinninani,

    1. How do you update the value on server side?

    2. Text field column? Are you using a ComponentColumn?
  3. #3
    Hi Daniil,

    Thanks for quick response.

    I am using only Column class not component column.

    Here is my server side code:

    X.GetCmp<Store>("storeId").GetById(id).Commit();

    Regards,
    Chinni
  4. #4
    Quote Originally Posted by chinninani View Post
    I am using only Column class not component column.

    Here is my server side code:

    X.GetCmp<Store>("storeId").GetById(id).Commit();
    The Commit method commits all changes made to the instance since either creation or the last commit operation.
    http://docs.sencha.com/extjs/4.2.1/#...-method-commit

    So, it doesn't change a record. Please clarify how do you change the value of the specified Column according to the selected item in the ComboBox?

    You might need to use the Set method, but I am not sure it is the best in your scenario.
    X.GetCmp<Store>("storeId").GetById(id).Set("dataIndex", "value");
    If you provide us with a test case, I think it would clarify everything.

    As for colorizing cells, please use a Column's Renderer.Do you need to apply some color initial and forever or it depends on some condition?

    If the first, you can apply custom CSS on cells. Here is an example.
    https://examples2.ext.net/#/GridPane...ous/Custom_UI/

    If the second, using a Column's Renderer is better.
    https://examples2.ext.net/#/GridPanel/ArrayGrid/Simple/
    http://docs.sencha.com/extjs/4.2.1/#...n-cfg-renderer

    P.S. In the future please keep one topic per one thread.

Similar Threads

  1. Change GridPanel Cell background color
    By mis@adphk.com in forum 2.x Help
    Replies: 1
    Last Post: Mar 19, 2013, 1:43 AM
  2. [CLOSED] Change column background color after render
    By RCM in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 10, 2012, 7:08 AM
  3. Replies: 1
    Last Post: Jul 10, 2012, 11:16 AM
  4. How to Background color to the cell in Tree grid
    By rajputamit in forum 1.x Help
    Replies: 2
    Last Post: May 06, 2012, 4:16 PM
  5. Replies: 1
    Last Post: Nov 24, 2011, 6:48 AM

Posting Permissions