Creating alternate row color
Last Post 09-15-2012 05:05 AM by Ryan Bakerink. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages Informative
wazooUser is Offline
wading in the water
wading in the water
Posts:19
Avatar

--
09-14-2012 03:32 PM

    Demonstration from blog:

    "This can only be accomplished when using Custom SQL as the Data Source of your Dynamic View. Here’s the SQL that’s being used in this Dynamic View:

    select *, (CASE WHEN ABS(TemplateID) % 2 = 1 THEN '#F6F6F6' ELSE '#E8E8E8' END) As TheRowColor from Module_Templates" 


    Does this demonstration has the table name Module_Templates? If I do have my own table name then what syntax would be like?

    Select * from MyTableName,
    (CASE WHEN ABS(TemplateID) % 2 = 1 THEN '#F6F6F6' ELSE '#E8E8E8' END) As TheRowColor from Module_Templates

    Thank you for your time.
    Tony
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    09-15-2012 05:05 AM
    Hello Tony,

    Yes in my demonstration my SQL table is named "Module_Template". So if you table name was "SQLTableName" then you could simply use this query:

    Select *, (CASE WHEN ABS(TemplateID) % 2 = 1 THEN '#F6F6F6' ELSE '#E8E8E8' END) As TheRowColor from SQLTableName

    TheRowColor is only a column that I'm returning.

    Please let me know if you have any questions.

    Thanks,

    Ryan



    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi