Method Community

 

Color Coding

Last post 01-15-2014 11:33 AM by Anonymous. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-13-2014 1:13 PM

    • JWS
    • Top 150 Contributor
    • Joined on 09-13-2013
    • Posts 40

    Color Coding

    2 questions. First, can a grid, for example sales order list, have different color columns?

    Secondly canthe text color change based on information gathered from the sales order?

    For example if the sales order is not invoiced the text on the grid reads in Red or of it is invoiced it is black.

    JWS
  • 01-14-2014 12:29 PM In reply to

    Re: Color Coding

    Hi JWS,

    I am sorry for taking so long to answer this post for you, I am still looking into your questions, however it has taken me some time because I have to do some testing to answer this correctly.  Please give me a little more time to work through this, I will hopefully have something for you soon.  As a hint, I know you can use "SQL Overrides" for each Column in your Grid, this will allow you to specify a font and possibly background color unique to each column.  However, I don't believe you can change the grid color based on certain criteria, but I will look at this a bit deeper also to see if I am mistaken.

    -Ben

  • 01-14-2014 2:46 PM In reply to

    • JWS
    • Top 150 Contributor
    • Joined on 09-13-2013
    • Posts 40

    Re: Color Coding

    Di you know what the SQL Overide code is for the columns? 

    JWS
  • 01-15-2014 9:47 AM In reply to

    Re: Color Coding

    JWS,

    I just finished creating a couple examples of the code you would use in the HTML Override, here is a screenshot of my end result (don't judge my color choices!):

    Keep in mind, you need you are essentially using either HTML or CSS code in the SQL Override area to make use of colors, I have provided three examples below of what I used to fill in the SQL Override area for each column.

    Name: '<font color="blue">' + Name + '</font>'     <----(using straight HTML)

    Phone: '<span style="background-color:green &#59 color:blue">' + Phone + '</span>'  <-----(using CSS with more than one attribute)

    Contact: '<span style="color:red">' + Contact + '</span>' <---(using CSS again, but only with one attribute)

    I hope this helps get you started, let me know if you have any questions on this.

    -Ben

  • 01-15-2014 11:21 AM In reply to

    • JWS
    • Top 150 Contributor
    • Joined on 09-13-2013
    • Posts 40

    Re: Color Coding

    I get a “invalid code” message after the screen loads.

     

    Also after I enter the code into SQL Overide. The Advanced button becomes read only. So I need to delete the column and enter it again.

    JWS
  • 01-15-2014 11:33 AM In reply to

    Re: Color Coding

    JWS, I am not sure the reason why you are getting the "Invalid Code" after your screen loads, is this a pop-up error message, screenshot?  Also do you have a screenshot of your SQL Override?  The example I gave above was done from one of my accounts this morning, so I know this should technically work in all accounts.  You could try just copying one of my SQL Overrides as a test, then just change the Column name to the name you are using.  Make sure also to use the Column name, not the label you provided for the grid.

     In regards to trying to edit a column after you have already added an SQL Override, this is actually a bug that was recently found in Method.  Our developers have prepared a solution, but it won't likely be deployed to our live site for another couple of weeks.  Unfortunately for now, you will have to continue with deleting the column, then adding it again to change the SQL Override as a workaround.  

Page 1 of 1 (6 items)