gpt4 book ai didi

jquery - 修复 JQGrid 中的 Navgrid 样式

转载 作者:太空宇宙 更新时间:2023-11-04 14:20:16 25 4
gpt4 key购买 nike

我有一个 JQGrid,它有一个导航网格,但它没有按我想要的方式显示。有一些按钮看起来很奇怪,如下图所示:

jqgrid navgrid style issue

可以看到,数字并没有完全显示出来,数字旁边的按钮也被切掉了。另外,我想减小显示页码的文本框的大小,它太大了,以及有视觉问题的文本框的大小。

这是我的 View 代码:

    <script type="text/javascript">

$(document).ready(function (){
jQuery("#list").jqGrid({
url: 'http://localhost/ProyectoNetbeans/CodeIgniter_2.1.3/index.php/MedioInformativo_controller/loadData',
mtype : "post", //Ajax request type. It also could be GET
datatype: "json", //supported formats XML, JSON or Arrray
colNames:['Indice','Descripción'], //Grid column headings
colModel:[
{name:'indice', index:'indice', editable:true, hidden:true, edittype:'text'},
{name:'descripcion', index:'descripcion', editable:true, edittype:'text'}

],
pager: '#pager',
width: 900,
rowNum:10,
rowList:[15,30],
sortname: 'indice',
reloadAfterSubmit: true,
sortorder: 'asc',
viewrecords: true,
postData: {descripcion:"descripcion"},
caption: 'Medio informativo',
onSelectRow: function(id)
{
var dataFromCellByColumnName="";
var index=$("#list").getGridParam("selrow");
var rowId = jQuery('#list tr:eq('+index+')').attr('ID');
var dataFromTheRow = jQuery('#list').jqGrid ('getRowData', rowId);
dataFromCellByColumnName = jQuery('#list').jqGrid ('getCell', rowId, 'indice');
setIndice(dataFromCellByColumnName);

}
}).navGrid('#pager',{edit:true,add:true,del:true},
{//EDITAR

},
{//AGREGAR
jqModal:false,
reloadAfterSubmit:true,
savekey: [true,13],
drag: true,
closeOnEscape:true,
closeAfterAdd:true,
url:"http://localhost/ProyectoNetbeans/CodeIgniter_2.1.3/index.php/MedioInformativo_controller/addData",
beforeSubmit: function(postdata, formid){//valida que no halla errores en la insercion de datos
//alert(postdata.Pais);//imprime lo que se mando en el texto
if (postdata.descripcion=="")
{
return [false,'DESCRIPCION EN BLANCO, INSERTE UNA DESCRIPCION'];
}
else if (postdata.descripcion.length>50)
{
return [false,'NUMERO DE CARACTERES PARA DESCRIPCION EXCEDIDO, MAXIMO=50'];
}
else
{
return [true,'EXITO']; // no error
}

}

},
{// DELETE

},

{multipleSearch : false}, // enable the advanced searching
{closeOnEscape:true} /* allow the view dialog to be closed when user press ESC key*/
);
});
</script>

有人知道这里可以做什么吗?

最佳答案

我想您与您也包含的 Twitter Bootstrap CSS 有冲突。要解决此问题,您必须添加 the answer 中描述的 CSS 样式将控件的 width 重置为 width: auto; 并重置一些其他 CSS 设置。

顺便你可以考虑使用Font Awesome icons此外。参见 another answer其中描述了细节。

关于jquery - 修复 JQGrid 中的 Navgrid 样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19991342/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com