free-jqgrid

how to enable enter in jqgrid advanced search window

怎甘沉沦 提交于 2019-12-17 20:28:34
问题 Pressing search button in jqgrid toolbar opens advanced search window. Pressing enter key does not start seach. To start search, search button needs to be clicked. How to allow enter key press to start search like in clicking in search button ? 回答1: To implement search on Enter key one have to implement binding to keydown event to any input fields and force searching on Enter . If you include jQuery UI jquery-ui.min.js then you can use $.ui.keyCode.ENTER instead of 13 for the better

How to specify value for read only field in advanced search dialog

元气小坏坏 提交于 2019-12-13 19:17:52
问题 I'm looking for a way to allow user to specify vlaue in advanced search dialog in latest free jqgrid. I tried code below and selected advanced search dialog. Tax field is read-only and cannot changed. How to fix this ? <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Demonstrats loadFilterDefaults:true option</title> <meta name="author" content="Oleg

Free jqGrid 4.8.0 - restore grid toolbarfilter values

一个人想着一个人 提交于 2019-12-13 06:51:03
问题 I'm trying to restore the grid after doing GridUnload to it's previous state in terms of filter, sort, group etc'. I successfully achieved restoring all of those, but missing some visual aspects within the grid that are not part of the data i'm restoring, and as such I can't see them. For example, I do restore the filter values (toolbarfilter), but I can't see the filters values in the toolbar. (they are there, as I can restore them using $("#gview_"+$grid.attr('id')+' #' + inputId).val

jQuery unrecognized Expression error in jqGrid dataUrl method for edittype='select'

夙愿已清 提交于 2019-12-13 04:35:11
问题 This is in continuation of this thread. I'm using the free-jqGrid 4.9.0 and have inline editing. { name: 'ContactName', editable: true, width: 100, sortable: false, frozen: true, formatter: 'select', edittype: 'select', editoptions: { dataUrl: '/InvestorList/GetContactList', postData: function (rowid, value, cmName) { return { projectId: rowid }; } } In my ASP .NET MVC controller , I have the following method: public JsonResult GetContactList(string projectId) { var contacts = new Dictionary

How to send the data to the server after inline editing?

自作多情 提交于 2019-12-13 03:25:18
问题 I am using jQgrid Free (release 4.15.2) and I need to add the ability to edit rows inline which is not a problem at all because it's pretty easy to setup. Here is the code I am using: $.jgrid = $.jgrid || {}; $.jgrid.no_legacy_api = true; $.jgrid.useJSON = true; $(function () { "use strict"; var $grid = $("#list"), pagerSelector = "#pager", customAddButton = function (options) { $grid.jqGrid('navButtonAdd', pagerSelector, options); $grid.jqGrid('navButtonAdd', '#' + $grid[0].id + "_toppager",

“pager: true” vs “pager: #someid” in jqGrid, how to use them properly?

懵懂的女人 提交于 2019-12-13 02:58:54
问题 I am playing a little bit with the jqGrid setup and some things aren't clear to me like the proper usage of pager . The idea is to add some custom buttons to the top and bottom bars. This is the code I have been playing with: $("#order_logs").jqGrid({ url: 'api_order_logs', datatype: "json", colModel: $('#colmodel').data('values'), width: 980, height: 300, pager: true, toppager: true, hoverrows: true, shrinkToFit: true, autowidth: true, rownumbers: true, viewrecords: true, rowList: [25, 50,

How to categorize rows in the free grid jqgrid?

瘦欲@ 提交于 2019-12-13 00:47:06
问题 Hi i have the following table to generate a json dataset it has the following data i have script teh table USE [GridSamples] GO /****** Object: Table [dbo].[SalesStats] Script Date: 12/13/2016 07:34:51 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[SalesStats]( [id] [int] IDENTITY(1,1) NOT NULL, [makes] [nchar](10) NOT NULL, [models] [nchar](10) NOT NULL, [fuelusagecity] [nchar](10) NOT NULL, [fuelusagehwy] [nchar](10) NOT NULL,

How to use body horizontal scrollbar in free jqgrid

扶醉桌前 提交于 2019-12-12 04:39:50
问题 Jqgrid from github does allow to use browser body element horizontal scrollbar if its properties autowidth: true, shrinkToFit: false, are used. To reproduce, open page below in chrome (created from sample in How to remove free jqgrid own horizontal scrollbar if autowidth:true is used ). Body element horizontal scrollbar is not usable: it does not allow to scroll into rightmost columns. How to fix this so that browser body scrollbar can normally used and jqgrid own horizontal scrollbar does

How set background color of each level in hierarchical jqgrid

最后都变了- 提交于 2019-12-12 03:53:49
问题 I use free jqgrid(v5.1.1) in my asp.net mvc project. In my view,I have 5 level hierarchical jqgrid. how can I set background color of header of each level? for example header of first level has "blue" color,second level has "green" color,third level has "light blue" color and.... here is my code: //************************************fill grid level 1 ********************************** function FillJQueryGrid(ProjectIdVal) { $("#jqGrid").jqGrid({ url: '@Url.Action("GetCodingCodeSumLists",

How to update column on other column change in inline edit

試著忘記壹切 提交于 2019-12-12 03:51:45
问题 Free jqgrid contains 3 columns: Price, Quantity and Sum. html5 number input type is used. If Sum column is changed in inline edit, Price column value should calculated using formula Price = Sum / Quantity; I tried to implement this using jqgrid template below but it does not change price column since input#Price and input#Quantity are undefined. Element ids are created from row id and are different in every row. Jqgrid does not pass row id value to change event. Which is best practice in free