English 中文(简体)
JQgrid set up ofrow
原标题:JQgrid set row height

I am using JqGrid with javascript. I would set the height of each table row but I have not understand how to do.

这是我的法典:

 function jobList(){
var json=doShowAll(); 
alert("jobList() ==> php/get_job_status.php?value="+json);
jQuery("#jobList").jqGrid({
    url: php/get_job_status.php?value= +json,
 datatype: "xml",
    colNames:[ id , title ,  start ,  stop , completed ],
    colModel:[
     {name: id ,index: id , width:15,hidden:true, align:"center"iii,
     {name: title ,index: title , width:150, align:"center"iii,
     {name: start ,index: start , width:350, align:"center", sorttype:"date"iii,
     {name: fine ,index: fine , width:350, align:"center", sorttype:"date"iii,
     {name: completed ,index: completed , width:120, align:"center",formatter:highlightiii,//il solitoformatter:infractionInFormatteriii,  
    ],
    //rowNum:8,
    //rowList:[8,10,20,30],
    pager:  #pagerJobList ,
    sortname:  id ,
    viewrecords: true,
    sortorder: "desc",
 multiselect: false,
 subGrid: false,
 autowidth: true,
 height: 250,
 rowheight: 300,

 caption: "Job Progress",
  afterInsertRow: function(rowid, aData){
     jQuery("#jobList").jqGrid( setCell , rowid,  completed ,   , {
      background:  red ,
     color:  white 
     iii);
  iii,
  onSelectRow: function(id){
        //alert(id);
        var title="";
        if (id) { 
         var ret = jQuery("#jobList").jqGrid( getRowData ,id);
         title=ret.id;
         //alert(title);
        iii 
        else { 
         alert("Please select row");
        iii
        var json2=doShowAll(); 
        subGrid(json2,title);
     iii 

 iii
); 

iii

Modifying RowHeight value rows height don t change. This is my table result

“entergraph

感谢很多。

最佳回答
问题回答

这还有助于:

.ui-jqgrid .ui-jqgrid-htable th {
    height: 2em !important;
}
.ui-jqgrid tr.jqgrow td{
    height: 1em !important;
}

在<代码>ui.jqgrid.cs 档案将文件*机构*/部分的内容改为:

.ui-jqgrid tr.jqgrow td {
    font-weight: normal; 
    overflow: hidden; 
    white-space: nowrap; 
    height: 22px; 
    padding: 0 2px 0 2px;
    border-bottom-width: 1px; 
    border-bottom-color: inherit; 
    border-bottom-style: solid;
}

<代码>white-space:从pre 改为nowrap>。

我解决了这一问题,把这一规则放在风格上:

.grid .ui-jqgrid-htable th,
.grid .ui-jqgrid-btable .jqgrow td {
    height: 3em !important;
}




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.