简体   繁体   中英

dojox.grid.DataGrid making multi row header

I want to make grid with multi row header using dojox.grid.Datagrid:

    <table  data-dojo-id="monthReportTable" data-dojo-type="dojox.grid.DataGrid" autoHeight="true" autoWidth="true">
    <thead>
    <tr>
       <th field="employee"   rowspan="2"    width="150px"     >Сотрудник</th>
       <th field="division"   rowspan="2"    width="150px"     >Подразделение</th>
       <th field="region"     rowspan="2"    width="100px"     >Регион</th>
       <th field="ts_month"   colspan="3"                     >В табель за месяц</th>
       <th field="calc_month" colspan="3"                     >Расчетные показатели за месяц</th>
    </tr>
    <tr>
        <th field="ts_worked"              width="100px" title="Количество отработанных дней (фактическое)"      >Отработано</th>
        <th field="ts_vacation"            width="100px" title="Количество дней отпуска"                         >Отпуск</th>
        <th field="ts_illness"             width="100px" title="Количество дней болезни"                         >Больничный</th>

        <th field="calc_worked_plan"       width="100px" title="Количество отработанных дней (плановое)"         >Отработано (план)</th>
        <th field="calc_worked_fact"       width="100px" title="Количество отработанных дней (фактическое)"      >Отработано (факт)</th>
        <th field="calc_vacation"          width="100px" title="Количество дней отпуска"                         >Отпуск</th>
    </tr>
    </thead>
</table>

I hope to get something like this: https://www.dropbox.com/s/iepnjk1aan9el72/1.PNG?dl=0

But then I initialize the store, I had this picture: https://www.dropbox.com/s/cnt4lzhsjex2jj5/2.PNG?dl=0

A row has big height, and without another columns. Don't understand why so, because there is no error in browser console. It does not work properly in FF and Chrome.

So, I think may there must be some specific kind of store? Anybody has problem like this? How to solve problem?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM