ComponentOne Query 8.0
Script Attribute: RenderScript

Using the C1QRender script, you can completely change the layout of items in a C1QueryFrame control to customize it to your users’ needs. You can change the rules of query composition, as it appears on display. One of C1Query tutorials shows how to do it by presenting a sample script making the query display look as a formula with parentheses instead of the default row outline. User interaction with such query remains fully functional although its layout is completely different.

There is a special C1QueryFrame property, ManualRender, which is False by default. Setting it to True enables the C1QRender script. In this case, rendering HTML for display is performed not by the C1QueryFrame control itself, but by the C1QRender script.

Replacing the C1QRender attribute with your own script, and setting ManualRender to True, you can render the items in whatever way you prefer. See the Tutorials for an example how to use this powerful customization functionality.

Two special methods of C1QueryFrame are useful implementing C1QRender script:

The GenerateHTML method performs tag substitution as described in Tag substitution rules. So you can use special tags in your C1QRender script and apply GenerateHTML to substitute the tags. The WrapHTML method wraps a text in <DIV> or <SPAN> tags with special id and other properties. This method is required to turn an HTML text into a query item. It must always be applied to HTML representing a query item before adding it to the generated HTML text. See the default C1QRender script and the tutorial for examples of how to use the GenerateHTML and WrapHTML methods.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback