質問

I would like to set the custom style or CSS class on the column of Dojo's GridX to customize the content layout (centering of text, background color, font etc.).

For example, I have now the following block (rendered):

<td colid="extern" tabindex="-1" role="gridcell" class="gridxCell  " aria-describedby="gridx_Grid_0-extern">
    <div class="gridxCellWidget" id="dijit__WidgetsInTemplateMixin_10" widgetid="dijit__WidgetsInTemplateMixin_10">
    </div>
</td>

I'd like to tell GridX renderer to append the class extern to either td or div (or both).

Is there a standard way to do so (a parameter to structure, for example)? If no, in which code fragment I could build my custom hook, that would do namely what I have described?

役に立ちましたか?

解決

I was able to pass style and class property in the column definition, something like

{
 id: some_id,
 field: some_field,
 style: "text-align: left",
 class: "extern"
}

I'm still researching the gridx and I don't know what can be done here, but this worked for me for now. I will try to pass a css class in the column definition.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top