Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The data type if the column is used for it's representation(formatting) and editing behavior, but there's no extra markup generated that you can use to target with styling.</p> <p>However, you are building column definitions server side, where you know exactly what type each column is while creating its definition, no?</p> <p><strong>Update:</strong> It's been a while since the original answer and for future reference you can use the <a href="http://help.infragistics.com/jQuery/2015.1/ui.iggrid#options:columns.columnCssClass" rel="nofollow">columnCssClass</a> to apply your class to the actual TD rather than the template. The latter is still a valid option for advanced tinkering.</p> <p>Easiest way I can think of is through <a href="http://www.infragistics.com/products/jquery/sample/grid/row-template" rel="nofollow">Column templates</a> - this way you can add whatever styling / formatting to the columns. For example, based of whatever logic you need, you return some columns as:</p> <pre><code>{ key: 'status', dataType: 'bool', headerText: 'Status', template: '&lt;div class="rightAlign"&gt; ${status} &lt;/div&gt;' } </code></pre> <p>You apply "text-align:right;" though the class and skip adding template for columns that should be with default look. Since this definition is generated on the server (imagine my example uses Node.js :P ) you can have those templates static, or create them differently each time - it's up to you. </p> <p>JSFiddle: <a href="http://jsfiddle.net/damyanpetev/wsZ8c/" rel="nofollow">http://jsfiddle.net/damyanpetev/wsZ8c/</a></p> <p>Note: Make sure you use a block (div,p) in this case as you need something that will take up the entire grid cell in order to align text inside.</p> <p>If that solution doesn't fit, you will have to go through columns and apply styling on the client in a similar way you were thinking of.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload