- Today
- Total
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Link
- 재능이의 돈버는 일기
- StresslessLife
- K_JIN2SM
- 소소한 일상
- My Life Style & Memory a Box
- Blog's generation
- 공감 스토리
- 취객의 프로그래밍 연구실
- Love Me
- Dream Archive
- 세상에 발자취를 남기다 by kongmingu
- hanglesoul
- 카마의 IT 초행길
- 느리게.
- 미친듯이 즐겨보자..
- Joo studio
- Gonna be insane
- 악 다 날아갔어!! 갇대밋! 왓더...
- xopowo05
- 맑은공기희망운동
- 엔지니어 독립운동
- 혁준 블로그
- Simple in Complex with Simple
- 무의식이 의식을 지배한다
드럼치는 프로그래머
[jQuery] jqGrid row vertical alignment not middle 본문
★─Programing/☆─WebProgram
[jQuery] jqGrid row vertical alignment not middle
드럼치는한동이 2016. 8. 3. 09:40For some reason on our grid the vertical alignment of the rows is not middle. It appears to be top. Is there something specific you have to do to achieve vertical alignment?
Here's an example of the alignment:
Our grid definitions:
$.extend(jQuery.jgrid.defaults, {
url:'NoData.json',
datatype: 'json',
mtype: 'GET',
altRows:true,
//altclass:'zebraOdd',
loadError: function(xhr,st,err) {
handleError(xhr, 'Error loading grid');
},
onPaging: function (b) {
return onPage($(this));
},
beforeRequest: function() {
beforeReq($(this));
},
loadComplete: function() {
loadComp($(this));
},
onSelectRow: function(id){
$(this).resetSelection(); //This prevents the disabling of the row hovering and altclass - http://stackoverflow.com/questions/3916477
},
scrollOffset:0, //No scrollbar
rowNum:15,
shrinkToFit:true,
width:1120,
viewrecords: true ,
height: '360',
hidegrid: false //Don't show the expand/collapse button on the top right
});
$("#grid-pos").jqGrid({
colNames:['Position Account', 'Product Code', 'Product Type','Expiry', 'Put/Call', 'Strike Price', 'Current Long', 'Current Short', 'Held Exercise Requests', 'Held Abandon Requests', 'Last Trade Date / Expiration Date', 'Select Operation'],
colModel :[
{name:'account', index:'account', width:85, sortable:false},
{name:'productCode', index:'productCode', width:85, sortable:false},
{name:'productType', index:'productType', width:85, sortable:false},
{name:'expiry', index:'expiry', width:85, align:'right',stype:'select', sortable:false},
{name:'putCall', index:'putCall', width:85, sortable:false},
{name:'strike', index:'strike', sorttype: 'float', align:'right', width:85, sortable:false},
{name:'long', index:'long', width:85, align:'right', sortable:false},
{name:'short', index:'short', width:85, align:'right', sortable:false},
{name:'exercise', index:'exercise', width:90, align:'right', sortable:false},
{name:'abandon', index:'abandon', width:90, align:'right', sortable:false},
{name:'LTD', index:'LTD', width:110, align:'right', sortable:false},
{index:'operations', width:150, title:false, align: 'center', formatter:opsFormatter, sortable:false}
],
pager: '#div-pos-pager',
caption: 'View Positions'
});
Answers
Have you tried applying vertical-align: middle; css property to your table cells?
I believe default vertical alignment is top so applying the above should override that. Also if you can give me a link to an example page that shows this I can look into it further.
This will make it middle-align. Change it from middle to top or bottom if you have other needs.
<style type="text/css">
.ui-jqgrid tr.jqgrow td {vertical-align:middle !important}
</style>
<style>
.ui-jqgrid tr.jqgrow { outline-style: none; color:#286abf;font-weight:normal; cursor : pointer; vertical-align:top }
</style>
[출처] http://stackoverflow.com/questions/4148469/jqgrid-row-vertical-alignment-not-middle
'★─Programing > ☆─WebProgram' 카테고리의 다른 글
[Security] 세션 ID가 업데이트되지 않음 (0) | 2016.11.09 |
---|---|
[Security] SQL 인젝션 (0) | 2016.11.09 |
[HTML] 테이블의 <td> 안에 있는 내용 오른쪽 정렬 (0) | 2016.07.28 |
[JavaScript] createElement, 새로운 요소 생성하기. (0) | 2016.07.28 |
[JavaScript] Add onClick event to document.createElement(“th”) (0) | 2016.07.28 |
Comments