Hello All,
I am trying to display some database information using the DHTMLXGrid from Ruby on rails…The data in the grid is loaded from a dynamically generated XML file.What we need to display is a comparison of 2 objects with different properties.If they have different properties,it should be in red color.
What is the way to set the color of the text in cell ?
Please reply.
Thankyou.
If you build your grid content via XML from the server side query like I do, then this works…
xmlRows.Append(“RED on YELLOW”);
Regards,
Eric
Hi Eric,
Isnt this a js function?I want to configure the color of the text through the xml file itself.
Should the tag contain that info?
Regards,
Vrushali
If you want to configure the color of the text through the xml file you should use “style” attribute of the tag.
My example is building XML on the server side using the style attribute in the cell, just as Olga suggests.
In my example, “xmlRows” is a StringBuilder variable in my .NET C# program (web service - I call web services from my client to get the xml data for my screens/grids).
This line below is just building one cell in the XML response to the client, with a red text and yellow background, using the style attribute, standard HTML table coding. The “RED on YELLOW” is the text the will display in the grid cell. Just as an example.
xmlRows.Append(“RED on YELLOW”);
Cheers,
Eric