html을 사용하여 선언적으로 작성된 Dojo 데이터 격자가 있습니다. 기둥을 오른쪽 정렬해야합니다. 나는 그것이Dojo Datagrid의 컬럼을 선언적으로 오른쪽 정렬하는 방법
다음 예에서 1
을 시도 동작하지 않습니다, 다음과 같은 두 가지 방법을 시도했습니다, 그는 align="right"
은 무시되지만, width="100px"
각 <td>
요소의 스타일에 추가
<table data-dojo-type="dojox.grid.DataGrid" style="height:100px;">
<thead>
<tr>
<th field="col1" width="auto">Col 1</th>
<th field="col2" width="100px" align="right">Col 2</th>
<th field="col3" width="100px" align="right">Col 3</th>
</tr>
</thead>
</table>
다음 예에서 2
시도 0은 완전 도장
당신은<th>
요소에
styles
속성을 사용할 필요가
<table data-dojo-type="dojox.grid.DataGrid" style="height:100px;">
<thead>
<tr>
<th field="col1" width="auto">Col 1</th>
<th field="col2" width="100px" style="text-align:right;">Col 2</th>
<th field="col3" width="100px" style="text-align:right;">Col 3</th>
</tr>
</thead>
</table>
당신이 무엇을 원하는 않습니다 "그리드 작업"튜토리얼이 속성을 발견 오른쪽 정렬? 열 자체? 또는 열 내의 텍스트? 나는 dojo docs (http://jsfiddle.net/jrkeller/3h6MN/)에서 그리드 어 피어 런스를 보여주기 위해 빠른 바이올린을 집어 넣었지만 당신이 무엇을 요구하는지 이해하지 못한다. – BuffaloBuffalo
@BuffaloBuffalo - 열 내의 텍스트를 오른쪽 정렬하고 싶습니다. Col2 및 Col3에는 소수 2 자리 숫자가 있습니다. 십진수가 일렬로 정렬되기를 바랍니다. – Danish
@BuffaloBuffalo - jsfiddle을 가져 주셔서 감사합니다. 텍스트를 오른쪽 정렬 할 수 없습니다. – Danish