jqgrid-asp.net

Replace Delete Icon of jqGrid with custom Icon

落爺英雄遲暮 提交于 2019-12-13 07:15:27
问题 I wanted to change just the delete Icon of jqGrid in actions column with my own Icon(newTrash-icon.png) . I've seen that jqGrid loads Icon from one png icons file. How do I replace the default trashcan Icon with some other trashcan Icon. I tried below code but it doesn't work. In my gridComplete $('.ui-icon-trash').removeClass('ui-icon-trash').addClass('ui-icon-customtrash'); In my CSS .ui-icon-customtrash { background: url("~/Images/newTrash-icon.png"); background-position: -64px -16px; } I

jqGrid—Reloading Data

帅比萌擦擦* 提交于 2019-12-13 05:19:48
问题 I'm trying to add an item to my data source, and then re-load the grid based on this answer. The grid loads fine. The addItemToGrid gets called a few times, and I'm verifying that the underlying tableSrc object is getting added to, but the grid remains unchanged. var tableSrc = { "rows": [ { "title": "Title1", "subtitle": "subTitle", "authors": ["a1", "a2", "a3"] }, { "title": "Title2", "subtitle": "subtitle", "authors": ["X", "Y"] }, { "title": "Title3", "subtitle": "subTitle", "authors": [

Performance Difference between client side jqgrid vs server side jqGrid

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 04:56:46
问题 I am working on an MVC project where I use jqGrid for ASP.NET MVC. However I am told by that the pure-jquery-client-side version (jqGrid) is better in performance. Is this true? To me they both seem to be doing the same stuff, just that the code is in different places- all the bulk work is still done using ajax. any advise would be appreciated. EDIT- most places I use the grid has less than a 100 rows,page size 30,about 10-12 columns, mostly strings and dates. Only one page I use a grid with

Json data is not binding to jqgrid

随声附和 提交于 2019-12-13 03:54:55
问题 This is my first example with jQGrid ,I've written the following code .Grid is displayed but data is not bound.I've looked many examples but found no answer This is my Jquery Code jQuery("#jQGridDemo").jqGrid({ url: 'http://localhost:7887/application/get', datatype: "json", contentType: 'application/json; charset=utf-8', page: 1, loadonce: true, gridView: true, loadonce: true, colNames: ['Application ID', 'Application Name', 'PageLink', 'CreatedDate'], colModel: [ { name: 'ApplicationId', key

How to add Edit and Delete Icons in jQGrid Actions column

末鹿安然 提交于 2019-12-13 03:04:18
问题 Somebody please help me adding edit and delete icons exactly as shown in the below demo link. http://www.trirand.net/aspnetmvc/grid/EditRowInlineActionIcons Below is my JQGrid. I tried adding formatter:'actions', formatoptions: {keys: true, editbutton:true,delbutton:true } but no luck in displaying the icons for edit and delete. I think I need to pass the Image sources for edit and delete icons somewhere, which I don't know. And also need to write some code to handle the click events of the

show/hide jqgrid delete button

梦想的初衷 提交于 2019-12-13 00:23:19
问题 I want to show/hide jqgrid delete button on the basis of specific data in jqGrid. $('#jqgFlagger').jqGrid('navGrid', '#jqgpFlagger', { add: false, del: false, edit: false, search: false }, { width: 'auto', url: '/DtlmTransaction/UpdateRole' }, { width: 'auto', url: '/DtlmTransaction/InsertRole' }, { width: 'auto', url: '/DtlmTransaction/DeleteMultiple' }); Above is the code that shows that I'm not using jqgrid own delete option but the custom delete option from the action which is as under;

Reset again and persist the data of JqGrid Row in Editable mode when some error return from Server

放肆的年华 提交于 2019-12-12 06:44:47
问题 enter image description hereIn "successfunc" the else part should retain the row in editable mode ... var editparameters= { "keys": true, "oneditfunc": function () { debugger; $("select#" + arrprimarykey + "_StateName").val(rowData.StateCode); }, "successfunc": function (data) { debugger; var msg = JSON.parse(data.responseText).Message; var msgType = JSON.parse(data.responseText).MsgType; if (msgType == "S") { alert(msg); $(CityMaster.idGrid).jqGrid('setGridParam', { datatype: 'json' })

Limit adding search options in jqgrid

血红的双手。 提交于 2019-12-12 05:37:54
问题 I was working on jqgrid functionality. In multi searching in jqgrid, on clicking '+' button continuously, the number of search tabs will be added infinitely. Is there any way to limit the adding of search rows ? 回答1: One can use afterRedraw callback to calculate the number of rules and to disable '+' buttons after the limit is archived. If the number of buttons less then the limit one should enable '+' buttons. See the answer for more details. 来源: https://stackoverflow.com/questions/28304784

In jqgrid, how to handle when no records exists on page or grid

▼魔方 西西 提交于 2019-12-12 02:53:10
问题 In jqgrid, when there are 6 records (Paging 5). So, first page has 5 records and second page has 1 record now, user has deleted 6th record (from page #2). Then, grid still remains on page #2 and no rows exists on page 2 as its deleted. It does not look good when 5 records on page 1 and no records on page 2 though, page selection appeared on page 2. Can you please guide how to solve that. i think, it should be move to earlier page (last page). Also, related issue: when all 6 records are

error Status: 'Internal Server Error'. Error Code: 500 - jqGrid ASP.NET MVC

别来无恙 提交于 2019-12-12 02:08:56
问题 I am using jqgrid Modal form to Add and Edit rows of the table. I am using Entity framework and Database First approach to create models from existing database. When I Add or Edit the rows, rows are added or edited correctly and being saved appropriately in the database and when I retrieve the added or edited rows and view in jqGrid, they are displayed correctly. But, the only issue is when I Add or Edit, it throws error Status: 'Internal Server Error'. Error Code: 500 in the modal form.