jqGrid - 更改过滤器/搜索弹出窗体 - 在页面上平放 - 不是对话框 [英] jqGrid - Change filter/search pop up form - to be flat on page - not a dialog

查看:1115
本文介绍了jqGrid - 更改过滤器/搜索弹出窗体 - 在页面上平放 - 不是对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jqgrid。

我真的需要这方面的帮助,并不知道如何去做,但我确定它可能...可以一个给我一个部分的答案?我现在有一个要求说,为了搜索和筛选网格我不希望常规模型表单弹出窗口的东西开放,而是过滤器应该是从开始?

打开时进入页面,但不是一个弹出窗体,但应该在页面的顶部,但仍然有所有的功能。



需要看起来像这:





再次让选择标签填充正确的信息(就像他们在弹出窗体中那样),当点击保存时,它应该发送请求到服务器,像常规。

这可能吗?

*******编辑*******



我基本需要的唯一的东西就是把对话框的一部分过滤掉。

解决方案

旧的搜索对话框的问题的解决方案,你可以找到here 。我在jqGrid中将演示修改为当前的搜索对话框。

您可以在

i.stack.imgur.com/ZVMux.pngalt =

相应的代码如下:

var $ grid = $('#list');

//创建网格
$ grid.jqGrid({
// jqGrid opetions
});

//设置搜索deafauls
$ .extend($。jgrid.search,{multipleSearch:true,multipleGroup:true,overlay:0});

//在创建nevigator bar期间(可选)不需要包含搜索按钮
$ grid.jqGrid('navGrid','#pager',{add:false,edit: false,del:false,search:false});

//创建搜索对话框
$ grid.jqGrid('searchGrid');
$ b $ var gridSelector = $ .jgrid.jqID($ grid [0] .id),//'list'
$ searchDialog = $(#searchmodfbox_+ gridSelector),
$ gbox = $(#gbox_+ gridSelector);

//隐藏搜索对话框的'close'按钮
$ searchDialog.find(a.ui-jqdialog-titlebar-close)。hide();

//将搜索对话框放在网格上方
$ searchDialog.insertBefore($ gbox);
$ searchDialog.css({position:relative,zIndex:auto,float:left})
$ gbox.css({clear:left});


I am using jqgrid.

I really need help with this, and have no clue how to do it, but i am sure its possible... can any one give me even a partial answer? were to start from?

I now have a requirement saying that for searching and filtering the grid I dont want the regular model form pop op thing opening, instead the filter should be open when entering the page but not as a pop up form , but should be on the top of the page but still have all the functions to it.

Needs to look like this:

And again having the select tag filled with the correct information (like they do in the popup form) and when clicking on "Save" it should send the request to the server, like regular.

Is this possible?

*******EDIT*******

The only thing i basically need is to have the filter with out the dialog part of it.

解决方案

The solution of the problem for the old searching dialog you can find here. I modified the demo to the current implementation of the searching dialog in the jqGrid.

You can see the results on the demo:

The corresponding code is below:

var $grid = $('#list');

// create the grid
$grid.jqGrid({
    // jqGrid opetions
});

// set searching deafauls
$.extend($.jgrid.search, {multipleSearch: true, multipleGroup: true, overlay: 0});

// during creating nevigator bar (optional) one don't need include searching button
$grid.jqGrid('navGrid', '#pager', {add: false, edit: false, del: false, search: false});

// create the searching dialog
$grid.jqGrid('searchGrid');

var gridSelector = $.jgrid.jqID($grid[0].id), // 'list'
    $searchDialog = $("#searchmodfbox_" + gridSelector),
    $gbox = $("#gbox_" + gridSelector);

// hide 'close' button of the searchring dialog
$searchDialog.find("a.ui-jqdialog-titlebar-close").hide();

// place the searching dialog above the grid
$searchDialog.insertBefore($gbox);
$searchDialog.css({position: "relative", zIndex: "auto", float: "left"})
$gbox.css({clear:"left"});

这篇关于jqGrid - 更改过滤器/搜索弹出窗体 - 在页面上平放 - 不是对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆