thiago_brum
|
 |
« on: June 03, 2016, 05:36:02 AM » |
|
I have a eDataGrid...
HTML...
<table id="datagrid_item_pedido" title="Itens" style="width:1000px;height:250px"> <thead> <tr> <th field="ies_checked" data-options="checkbox:true" width="18"></th> <th field="num_seq_item" data-options="hidden:true">Seq</th> <th field="cod_item" width="100">Item</th> <th field="qtd_solicitada" width="100" align="right" editor="{type:'numberbox',options:{precision:3,groupSeparator:'.',decimalSeparator:',',required:true}}">Quantidade</th> <th field="den_item" width="200">Descrição</th> <th field="pct_desconto" width="62" align="right" editor="{type:'numberbox',options:{precision:2,groupSeparator:'.',decimalSeparator:',',min:0,max:10}}">%Desc.</th> <th field="pct_acrescimo" width="62" align="right" editor="{type:'numberbox',options:{precision:2,groupSeparator:'.',decimalSeparator:',',min:0,max:10}}">%Acresc.</th> <th field="pre_unitario" width="100" align="right" data-options="formatter:function(value, row){ return new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(value);}">Preço</th> <th field="pct_icms">%Icms</th> <th field="pct_ipi">%Ipi</th> <th field="pre_unitario_ipi" align="right" editor="{type:'numberbox',options:{precision:3,groupSeparator:'.',decimalSeparator:',',editable:false}}" data-options="formatter:function(value, row){ return new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(value);}">Preço c/ IPI</th> <th field="pct_icms_st">%Icms ST</th> <th field="pre_unitario_final" width="100" align="right" editor="{type:'numberbox',options:{precision:3,groupSeparator:'.',decimalSeparator:',',required:true}}" data-options="formatter:function(value, row){ return new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(value);}">Preço Final</th> <th field="pre_total" width="100" align="right" editor="{type:'numberbox',options:{precision:3,groupSeparator:'.',decimalSeparator:',',editable:false}}" data-options="formatter:function(value, row){ return new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(value);}">Preço Total</th> <th field="pct_comissao" align="right" editor="{type:'numberbox',options:{precision:2,groupSeparator:'.',decimalSeparator:',',editable:false}}">Comissão</th> </tr> </thead> </table>
JS....
$('#datagrid_item_pedido').edatagrid({ });
If i call ...
$('#datagrid_item_pedido').edatagrid('addRow',{row:{num_seq_item: 0, cod_item:$('#cod_item').combobox('getValue'), qtd_solicitada: 1, den_item:$('#cod_item').combobox('getText'), pct_desconto: 0, pct_acrescimo: 0, pre_unitario: preco_unitario, pct_icms: data.pct_icms, pct_ipi: data.pct_ipi, pre_unitario_ipi: (preco_unitario * (1 + (data.pct_ipi/100))), pct_icms_st: data.pct_icms_st, pre_unitario_final: preco_unitario, pre_total: preco_unitario, pct_comissao: pctComissaoInicial }});
... column and header are not aligned. The column is a little more to the left of the header. Only if I add a new line column aligns with the header. Can someone help me?
|