Turning off alternating gray / white in query rows?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Turning off alternating gray / white in query rows?

Post by tford »

Can anyone help with a script to turn off alternating gray / white backgrounds in the query rows.

I have an application where all query row backgrounds need to be white.
Tom - V8.8 build 3137 - MySql / PostGres
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: Turning off alternating gray / white in query rows?

Post by BenHayat »

Tom, how about creating a custom query display where you will use HTML Table and will give you better control than using grid?
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Turning off alternating gray / white in query rows?

Post by tford »

Tom, how about creating a custom query display where you will use HTML Table and will give you better control than using grid?
Good thought, Ben. Do you know if it's possible to apply styles that are defined in the attribute like I normally would by checking "use attribute styles" box?

I'm guessing not .. but I have some conditional background colors that I'd like to apply to certain grid cells.
Tom - V8.8 build 3137 - MySql / PostGres
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: Turning off alternating gray / white in query rows?

Post by BenHayat »

tford wrote:
Tom, how about creating a custom query display where you will use HTML Table and will give you better control than using grid?
Good thought, Ben. Do you know if it's possible to apply styles that are defined in the attribute like I normally would by checking "use attribute styles" box?

I'm guessing not .. but I have some conditional background colors that I'd like to apply to certain grid cells.
I'm not really and HTML/CSS guy, but I *think* you have full control over, but you need to HTML/CSS well.
Jaymer
Posts: 2455
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Turning off alternating gray / white in query rows?

Post by Jaymer »

Personally, I like the alternating rows, but hey, I grew up using greenbar paper!!!
Screen Shot 2016-03-06 at 6.21.01 PM.png
Screen Shot 2016-03-06 at 6.21.01 PM.png (91.8 KiB) Viewed 11538 times
I even made mine "darker".

There is a style named k-alt which is for alternating rows in a query output.
To make mine darker, I just gave it a new value "#eeeeee" is light gray.
To make the alt row white, just make it "#FFFFFF"

In my custom CSS code (been talked about on the forum),
I added this code:
.jh-find-accounts tr.k-alt {
background-color: #eeeeee;
}

In your "resizing & styling" screen, accessible from the hamburger menu on a Query,
you'd add "jh-find-accounts" as shown here.
Screen Shot 2016-03-13 at 10.54.02 PM.png
Screen Shot 2016-03-13 at 10.54.02 PM.png (36.56 KiB) Viewed 11538 times
Its easy to keep your text editor open and SAVE changes to your CSS file to test your mods.
Just reload your aware app (by doing a screen refresh on whatever screen you are testing) and it reloads the new CSS. Nav to your test screen and you should see your changes.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2455
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Turning off alternating gray / white in query rows?

Post by Jaymer »

tford wrote:
Tom, how about creating a custom query display where you will use HTML Table and will give you better control than using grid?
Good thought, Ben. Do you know if it's possible to apply styles that are defined in the attribute like I normally would by checking "use attribute styles" box?

I'm guessing not .. but I have some conditional background colors that I'd like to apply to certain grid cells.

Really Ben?
I'd like to see an example of this.
Going "off grid" makes you lose all the functionality of the grid.
You cannot even... lets say I tried doing that like Magic HTML merge for the recs. Played with customer headers to. On a phone call w Vlad is convinced me thats not the way to go so IF you have some working pics of HTML grid replacements, I'd LOVE to see them.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: Turning off alternating gray / white in query rows?

Post by BenHayat »

Jaymer wrote:
tford wrote:
Tom, how about creating a custom query display where you will use HTML Table and will give you better control than using grid?
Good thought, Ben. Do you know if it's possible to apply styles that are defined in the attribute like I normally would by checking "use attribute styles" box?

I'm guessing not .. but I have some conditional background colors that I'd like to apply to certain grid cells.

Really Ben?
I'd like to see an example of this.
Going "off grid" makes you lose all the functionality of the grid.
You cannot even... lets say I tried doing that like Magic HTML merge for the recs. Played with customer headers to. On a phone call w Vlad is convinced me thats not the way to go so IF you have some working pics of HTML grid replacements, I'd LOVE to see them.
I had not done myself, but suggested to Tom to look into it.
So, if Vlad didn't think that's the way to, what was then his recommendation?
Jaymer
Posts: 2455
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Turning off alternating gray / white in query rows?

Post by Jaymer »

his sugg. was to use the grid.

This is an HTML merge screen:
Screen Shot 2016-03-14 at 12.01.39 AM.png
Screen Shot 2016-03-14 at 12.01.39 AM.png (79.21 KiB) Viewed 11533 times
I want to see a screen like this from AwareIM.
It was very hard. Removing the top Aware stuff/buttons/headings/margins was tough.
So I used Custom HTML and made the light green line appear.
But them the HTML for the data - where it says will execute for each row of data - isn't in the same <TABLE> as the green header row. So Columns won't line up.And then each row of output has to be its own <TABLE> or else I'm just outputting <tr> tags that don't point to a table.
Then there is the footer line - true, I don't need it for filtering anymore if I let Aware do it, but there's no "custom footer" section. SO how to get something at the bottom after my data.

All easy in Magic HTML merge.
So my look and feel is now totally different for this user base.
I remember him saying something like "this isn't what this customer HTML is to be used for" - so I left it at that.
Please start another thread if you want to to open a discussion on how/when/why to use custom HTML so we don't hijack this guy's thread.

Jaymer...
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: Turning off alternating gray / white in query rows?

Post by johntalbott »

tford wrote:Can anyone help with a script to turn off alternating gray / white backgrounds in the query rows.

I have an application where all query row backgrounds need to be white.
Put this in a custom css file.

.k-alt
{
background: transparent;
}
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Turning off alternating gray / white in query rows?

Post by tford »

Thanks for the tip John!

And by the way, I was seeking this solution for 1 grid where I made extensive use of conditional styles for various cells. Having a "clean" grid without alternating background colors for this scenario makes it more clear.
Tom - V8.8 build 3137 - MySql / PostGres
Post Reply