Search Results

Search found 314 results on 13 pages for 'jqgrid'.

Page 8/13 | < Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Retrieve Grid Id on CellEdit JqGrid

    - by Sergio
    Hi guys, i was trying to do a Cell Editing based on this documentation http://www.trirand.com/jqgridwiki/doku.php?id=wiki:cell_editing I have two questions: How can i get the Index of my row posted to the server: The information i'm getting posted is the following: a) value of the cell b) RowId The thing is that the rowId doesn't help me. I need the actual Id of the information I'm displaying so i can do the server update with that Id. colNames: ['Id', 'Codigo', 'Nombre'], colModel: [ { name: 'Id', index: 'Id', width: 50, align: 'left', hidden: true }, { name: 'Codigo', index: 'Codigo', width: 55, align: 'left', editable: true, editrules: { number: true} }, { name: 'Nombre', index: 'Nombre', width: 200, align: 'left' }], I need the value of the column 'Id' to do my update. 2.I don't understand in the documentation how to manage an error from the server, so I can display the error message. Thank you very much! Notes: a) I've already asked in the forum of trirand, but no one reply it to me. b) If anyone has done this, it would help if help me pasting the code. c) I'm working on MVC 2 Asp.net

    Read the article

  • what is the jqgrid footer json format

    - by Dennis
    hi. i am currently trying to solve my problem with the total in the footer. i tried searching in the internet with some examples, but they are using php, and i am using java. can you please show me what exactly the json looks like for this php script $response-userdata['total'] = 1234; $response-userdata['name'] = 'Totals:'; is this what it looks like? {"total":0,"userdata":[{"total":1234,"name":"Totals"}],"page":0,"aData":..... thanks.

    Read the article

  • JQgrid - escape ':' in searchoptions (value part)

    - by bsreekanth
    Hello, How to set the values for filter is explained here link text. I have two requirements. 1. the default value needs to be empty. I expect, if defaultValue is not set, the filter is empty, but that is not happening in my case. The first value is 2. How to escape ':' in my value. The character ':' and ';' are used to seperate the index and values. But, in my value string it contains a ':' (eg: searchoptions:{value:"1:'Level: 1'"} , where Level: 1 is my first value). How to escape : in the value part. I tried \ , / etc. thanks.

    Read the article

  • Populate a column as a result of performing math on two columns in a jqGrid.

    - by HacksawOnRye
    Background: Our company selected a workflow tool that has some "interersting" UI restrictions. jqGrid has been identified as one of best ways to overcome these restrictions. Consequently, the answers to this question need to be restricted to functionlity available within the jqGrid space. It pains me to pose this question and I know you will tempted to go down a million other paths - most that we have already traveled before. :( Question: Can jqGrid populate a column as a result of performing math on two other columns. The source of those two columns is in our control so we can "guarantee" that numeric data will be returned. Also, the result is something that we simplay want to display on demand but not store yet. On the example below, is there a function that allow the 'total' column to be populated from the following calculation: 'amount' * 'tax' Example jqGrid javascript: jQuery("#list3").jqGrid({ url:'server.php?q=2', datatype: "json", colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'], colModel:[ {name:'id',index:'id', width:60, sorttype:"int"}, {name:'invdate',index:'invdate', width:90, sorttype:"date"}, {name:'name',index:'name', width:100}, {name:'amount',index:'amount', width:80, align:"right",sorttype:"float"}, {name:'tax',index:'tax', width:80, align:"right",sorttype:"float"}, {name:'total',index:'total', width:80,align:"right",sorttype:"float"}, {name:'note',index:'note', width:150, sortable:false} ], rowNum:20, rowList:[10,20,30], pager: '#pager3', sortname: 'id', viewrecords: true, sortorder: "desc", loadonce: true, caption: "Load Once Example" });

    Read the article

  • in jqgrid, how can i have the editform disappear after submit

    - by leora
    right now, when i click submit it sends a message to the server and updates the databased and refreshes the screen but it keeps the edit form popup on the screen. Is there anyway to have it disappear once the submit is complete. its kind of annoying because its a little unclear that you are done because the form just sits there (even through the grid has refreshed) i have closeAfterEdit and closeAfterAdd set to true but it doesn't seem to do anything. jQuery("#grid").navGrid("#pager", { }, { height: 380, width: 500, reloadAfterSubmit: true, closeAfterEdit: true, url: siteRoot + controller + "/Update" }, { height: 380, width: 500, reloadAfterSubmit: true, closeAfterAdd: true, url: siteRoot + controller + "/Add" }, { reloadAfterSubmit: true, url: siteRoot + controller + "/Delete" }, { multipleSearch: true }

    Read the article

  • How do you modify the data returned from an AJAX call before it is rendered in the jqGrid?

    - by GiddyUpHorsey
    I'm trying to modify the data returned from an AJAX call before jqGrid 3.7.2 renders it. I've tried hooking into the loadComplete event but when I modify the data it appears to be after it has already rendered. I've also tried hooking into the success event on the ajaxGridOptions field of options but that seems to totally override the event and jqGrid doesn't render the data. How can I modify the data returned from a web service call before jqGrid renders it?

    Read the article

  • jqgrid modify data returned from ajax call before display in table

    - by user954211
    I have to display some data that I receive from the server as json object like this {"rowndx":"0","rows":"25","rowstotal":"100","rowsdata":[ ["00","DEVICE001","T0_IHOME","1","***","1","10"], ["01","DEVICE002","NO_DEVICE","1","***","1","10"], ["02","DEVICE003","NO_DEVICE","0","***","1","10"], ..... Before displaying the received data in a table I would like to make changes where necessary adding units to the numbers or replacing the numbers with words (eg 0 -OFF 1- ON) To do this I have associated at the ajax option "success" my encoding function. In this case, however, remains always visible the message "Loading ..." and no other action is permitted. I moved my re-encoding procedure to the "complete" ajax option and this time it seems to work. But I did not understand what was my mistake and I do not know if my procedure can work. This is my table ajax configuration url : "devtbl.json", mtype : "POST", datatype : "json", postData : ...... ajaxGridOptions: { type : 'post', contentType: 'application/json', async : false, complete : DEVparse_serverdata, error : function() { alert('Something bad happened. Stopping');}, }, jsonReader : { root : "tablerows", page : "currentpage", total : "totalpages", records : "totalrecords", cell : "", id : "0", userdata : "userdata", repeatitems : true }, and my coding function function DEVparse_serverdata(js , textStatus) { var jsontablereply = {} ; var rowsxpage_int = parseInt(UB.rowsxpage.DEVtable) ; var jsonreply = jQuery.parseJSON(js.responseText) ; jsontablereply.currentpage = "" + (1 + (parseInt(jsonreply.rowndx) / rowsxpage_int)); jsontablereply.totalpages = "" + parseInt((parseInt(jsonreply.rowstotal) + (rowsxpage_int-1)) / rowsxpage_int) ; jsontablereply.totalrecords = jsonreply.rowstotal; jsontablereply.tablerows = [] ; $.each(jsonreply.rowsdata, function(ndx, row) { var rowarray = [] ; rowarray[0] = row[0] ; rowarray[1] = row[1] ; rowarray[2] = row[2] ; rowarray[3] = row[3] ; rowarray[4] = row[4] ; switch (row[2]) { case "NO_DEVICE": rowarray[5] = "***" ; break ; case "T0_IHOME": rowarray[5] = "T=" + row[5] + "°C" ; break ; } jsontablereply.tablerows[ndx] = rowarray ; }) ; // each jQuery("#DEVtbl")[0].addJSONData(jsontablereply); } (I am a beginner with Jquery my coding style is poor)

    Read the article

  • jqgrid ASP.NET MVC -- getting data right for the grid.

    - by SamM09
    Here is my dilemma, I have not been able to manipulate my data to a form fitting to jqgrid standards. This is my first time using the jqgrid and I've spent a lot of time reading up on it. My js code is as follows: jQuery("#list").jqGrid({ url: '/Home/ListContacts/', dataType: "json", contentType: "application/json; charset=utf-8", mtype: 'POST', colNames: ['First Name', 'MI', 'Last Name'], colModel: [ { name: 'First Name', index: 'FName', width: 40, align: 'left' }, { name: 'MI', index: 'MInitial', width: 40, align: 'left' }, { name: 'Last Name', index: 'LName', width: 400, align: 'left'}], pager: jQuery('#pager'), rowNum: 10, rowList: [5, 10, 20, 50], sortname: 'Id', sortorder: "desc", repeatitems: false, viewrecords: true, imgpath: '/scripts/themes/basic/images', caption: 'My first grid' }); }); what im getting from the database: [["4","Jenna","Mccarthy"],["56","wer","weoiru"]] Now correct me if I am wrong, but the index: in my colModel refers to the column names in my database right? Could someone point to a reference that is straight forward or just start me off with this I would be most grateful.

    Read the article

  • how to use monthNames in jqgrid when validating date?

    - by Sasha
    Hi all. In my jqgrid when i am clicking on add new record i have date field prepopulated with current date. Format of the date is yyyy-MMM-d (e.g. 2010-Jan-23). Date is required field and when i click submit button it fails validation and displays error that this date is invalid, and it wants Y-m-d format. How can i check my value with jqgrid? In other words how to make jqgrid accept the following date format when validating 2010-Jan-23? Thanks.

    Read the article

  • How do I get jqGrid to work using ASP.NET + JSON on the backend?

    - by briandus
    Hi friends, ok, I'm back. I totally simplified my problem to just three simple fields and I'm still stuck on the same line using the addJSONData method. I've been stuck on this for days and no matter how I rework the ajax call, the json string, blah blah blah...I can NOT get this to work! I can't even get it to work as a function when adding one row of data manually. Can anyone PLEASE post a working sample of jqGrid that works with ASP.NET and JSON? Would you please include 2-3 fields (string, integer and date preferably?) I would be happy to see a working sample of jqGrid and just the manual addition of a JSON object using the addJSONData method. Thanks SO MUCH!! If I ever get this working, I will post a full code sample for all the other posting for help from ASP.NET, JSON users stuck on this as well. Again. THANKS!! tbl.addJSONData(objGridData); //err: tbl.addJSONData is not a function!! Here is what Firebug is showing when I receive this message: • objGridData Object total=1 page=1 records=5 rows=[5] ? Page "1" Records "5" Total "1" Rows [Object ID=1 PartnerID=BCN, Object ID=2 PartnerID=BCN, Object ID=3 PartnerID=BCN, 2 more... 0=Object 1=Object 2=Object 3=Object 4=Object] (index) 0 (prop) ID (value) 1 (prop) PartnerID (value) "BCN" (prop) DateTimeInserted (value) Thu May 29 2008 12:08:45 GMT-0700 (Pacific Daylight Time) * There are three more rows Here is the value of the variable tbl (value) 'Table.scroll' <TABLE cellspacing="0" cellpadding="0" border="0" style="width: 245px;" class="scroll grid_htable"><THEAD><TR><TH class="grid_sort grid_resize" style="width: 55px;"><SPAN> </SPAN><DIV id="jqgh_ID" style="cursor: pointer;">ID <IMG src="http://localhost/DNN5/js/jQuery/jqGrid-3.4.3/themes/sand/images/sort_desc.gif"/></DIV></TH><TH class="grid_resize" style="width: 90px;"><SPAN> </SPAN><DIV id="jqgh_PartnerID" style="cursor: pointer;">PartnerID </DIV></TH><TH class="grid_resize" style="width: 100px;"><SPAN> </SPAN><DIV id="jqgh_DateTimeInserted" style="cursor: pointer;">DateTimeInserted </DIV></TH></TR></THEAD></TABLE> Here is the complete function: $('table.scroll').jqGrid({ datatype: function(postdata) { mtype: "POST", $.ajax({ url: 'EDI.asmx/GetTestJSONString', type: "POST", contentType: "application/json; charset=utf-8", data: "{}", dataType: "text", //not json . let me try to parse success: function(msg, st) { if (st == "success") { var gridData; //strip of "d:" notation var result = JSON.parse(msg); for (var property in result) { gridData = result[property]; break; } var objGridData = eval("(" + gridData + ")"); //creates an object with visible data and structure var tbl = jQuery('table.scroll')[0]; alert(objGridData.rows[0].PartnerID); //displays the correct data //tbl.addJSONData(objGridData); //error received: addJSONData not a function //error received: addJSONData not a function (This uses eval as shown in the documentation) //tbl.addJSONData(eval("(" + objGridData + ")")); //the line below evaluates fine, creating an object and visible data and structure //var objGridData = eval("(" + gridData + ")"); //BUT, the same thing will not work here //tbl.addJSONData(eval("(" + gridData + ")")); //FIREBUG SHOWS THIS AS THE VALUE OF gridData: // "{"total":"1","page":"1","records":"5","rows":[{"ID":1,"PartnerID":"BCN","DateTimeInserted":new Date(1214412777787)},{"ID":2,"PartnerID":"BCN","DateTimeInserted":new Date(1212088125000)},{"ID":3,"PartnerID":"BCN","DateTimeInserted":new Date(1212088125547)},{"ID":4,"PartnerID":"EHG","DateTimeInserted":new Date(1235603192033)},{"ID":5,"PartnerID":"EMDEON","DateTimeInserted":new Date(1235603192000)}]}" } } }); }, jsonReader: { root: "rows", //arry containing actual data page: "page", //current page total: "total", //total pages for the query records: "records", //total number of records repeatitems: false, id: "ID" //index of the column with the PK in it }, colNames: [ 'ID', 'PartnerID', 'DateTimeInserted' ], colModel: [ { name: 'ID', index: 'ID', width: 55 }, { name: 'PartnerID', index: 'PartnerID', width: 90 }, { name: 'DateTimeInserted', index: 'DateTimeInserted', width: 100}], rowNum: 10, rowList: [10, 20, 30], imgpath: 'http://localhost/DNN5/js/jQuery/jqGrid-3.4.3/themes/sand/images', pager: jQuery('#pager'), sortname: 'ID', viewrecords: true, sortorder: "desc", caption: "TEST Example")};

    Read the article

  • How to use relative URL in jqGrid url parameter in ASP MVC?

    - by Chris Herring
    I've setup a jqGrid like this $('#gridTable').jqGrid({ url: '/GridData/', ... Now if I navigate to a url such as "/Controller/id/" then the grid will send a GET to "/GridData/" instead of "/Controller/id/GridData/". Can I make the GET relative so that I can pick the id up on the server side or do I have to manually pass the id as a parmater using javascript on the client?

    Read the article

  • How to add custom function in onClick-event jqGrid-mode editGridRow?

    - by Anatoliy
    Firstly I used this call jQuery('#grid').jqGrid('editRow',id,true,pickdates);, it worked fine with UI Datepicker integration, but editRow is implemented for inline editing, but I prefer modal dialog, so I switched to editGridRow, now I can't find the way to call my custom function (pickdates) in onClick-event. My current call is jQuery('#grid').jqGrid('editGridRow',id,{closeOnEscape:true,width:400,savekey:[true,13]}); Thanks Anatoliy

    Read the article

  • jqGrid (Delete row) - How to send additional POST data???

    - by ronanray
    Hi experts, I'm having problem with jqGrid delete mechanism as it only send "oper" and "id" parameters in form of POST data (id is the primary key of the table). The problem is, I need to delete a row based on the id and another column value, let's say user_id. How to add this user_id to the POST data??? I can summarize the issue as the following: How to get the cell value (user_id) of the selected row? AND, how to add that user_id to the POST data so it can be retrieved from the code behind where the actual delete process takes place. Sample codes: jQuery("#tags").jqGrid({ url: "subgrid.process.php, editurl: "subgrid.process.php?, datatype: "json", mtype: "POST", colNames:['id','user_id','status_type_id'], colModel:[{name:'id', index:'id', width:100, editable:true}, {name:'user_id', index:'user_id', width:200, editable:true}, {name:'status_type_id', index:'status_type_id', width:200} ], pager: '#pagernav2', rowNum:10, rowList:[10,20,30,40,50,100], sortname: 'id', sortorder: "asc", caption: "Test", height: 200 }); jQuery("#tags").jqGrid('navGrid','#pagernav2', {add:true,edit:false,del:true,search:false}, {}, {mtype:"POST",closeAfterAdd:true,reloadAfterSubmit:true}, // add options {mtype:"POST",reloadAfterSubmit:true}, // del options {} // search options ); Help....

    Read the article

  • How to Choose Fields While Using ExportToExcel in jqGrid ?

    - by João Guilherme
    Hi ! I have this jqGrid <trirand:JQGrid runat="server" ID="JQGrid1" OnRowEditing="JQGrid1_RowEditing" RenderingMode="Optimized" oncellbinding="JQGrid1_CellBinding" Height="350" EditUrl="/Ferramenta/Transacoes/TransacoesT.aspx"> <AppearanceSettings HighlightRowsOnHover="true"/> <Columns> <trirand:JQGridColumn DataField="IdLancamento" PrimaryKey="True" Visible="false" /> <trirand:JQGridColumn DataField="IdCategoria" Visible="false" /> <trirand:JQGridColumn DataField="DataLancamento" Editable="true" DataFormatString="{0:dd/MM/yy}" HeaderText="Data" Width="65" TextAlign="Center" CssClass="font_data" /> <trirand:JQGridColumn DataField="Descricao" Editable="true" HeaderText="Descrição" Width="330" /> <trirand:JQGridColumn DataField="NomeCategoria" Editable="true" EditType="DropDown" EditorControlID="ddlCategorias" HeaderText="Categoria"> <Formatter> <trirand:CustomFormatter FormatFunction="DefineUrl" /> </Formatter> </trirand:JQGridColumn> <trirand:JQGridColumn DataField="Valor" Editable="false" DataFormatString="{0:C}" HeaderText="Valor" Width="80" TextAlign="Center" /> </Columns> <ClientSideEvents RowSelect="editRow" /> <PagerSettings PageSize="20" /> <ToolBarSettings ShowEditButton="false" ShowRefreshButton="True" ShowAddButton="false" ShowDeleteButton="false" ShowSearchButton="false" /> <SortSettings InitialSortColumn=""></SortSettings> </trirand:JQGrid> <asp:LinkButton ID="lbExportar" runat="server" onclick="lbExportar_Click">Exportar todas as transações</asp:LinkButton> When I use the method ExportToExcel JQGrid1.ExportToExcel("export.xls"); it includes the first column IdLancamento that is not visible and also includes another column that is used on the query. Is it possible to choose the columns that are going to be exported ?

    Read the article

  • jqGrid local date manipulation; problem with row ids when deleting and adding new rows

    - by Sam
    I'm using jqGrid as a client side grid input, allowing the user to input multiple records before POSTing all the data back at once. I'm having a problem where if the user has added a few records (say 3 ) the id's for the records will be 1,2,3. if the user deletes record 2, you're left with 1 and 3 for the id of the records. When the user now adds a new records, jqGrid assigns that records the id 3 again since it just seems to count the total records and increments it by one for the new record. This causes problems when selecting rows as now the row id's are 1, 3 and 3. Does anyone know how to access the row ids of records as I could probably use the afterSubmit event and reassign the row id's increasing from 1. ( so after i delete row id 2, this will set the other row id's to 1 and 2) Any other suggestions to solve this problem? Thanks

    Read the article

  • In JQGrid I want to add a row button that doesnt post back.

    - by snyder
    The buttons I have added to the rows still post back even if I specifiy not to do so in the onclick method of the button (onclick=' return false;'). I supose its the grid doing the post back? I am tring to prevent the postback and show my own custom popup forms. gridComplete: function(){ var ids = $('#jqGridControl1').jqGrid('getDataIDs'); for(var i=0;i < ids.length;i++){ var rowid = ids[i]; de = "<input type='image' title='Delete this record.' src='../images/icn_delete.gif' onclick=' return false;' style='border-width:0px;'/>"; ee = "<input type='image' title='Edit this record.' src='../images/icn_edit.gif' onclick=' return false;' style='border-width:0px;' />"; ve = "<input type='image' title='View related information.' src='../images/house.gif' onclick='return false;' style='border-width:0px;' />"; pe = "<input type='image' title='Print' src='../images/icn_printer.gif' onclick=' return false;' style='border-width:0px;' />"; je = "<input type='image' title='Appointment' src='../images/icn_journal.gif' onclick=' return false;' style='border-width:0px;' />"; se = "<input type='image' title='Select' src='../images/icn_select.gif' onclick=' return false;' style='border-width:0px;' />"; jQuery('#jqGridControl1').jqGrid('setRowData',ids[i],{act:de+ee+ve+pe+je+se}); }

    Read the article

  • How can I get the search parameters from jqgrid in the server side?

    - by Jack
    I've been visiting this forum a lot without registering since several months ago, and I really like it. So, thanks in advance to all the members. Now I'd like to make my first question. I've been using Jqgrid for a few time, and I've managed to have it display the rows and buttons, but now I need to do a search, a complex one, and I thought that "automatically" jqgrid would send the parameters to the server, I mean: sField, searchField, sOper, searchOper, sValue, searchString, sFilter and/or filters I'm not sure at all which ones it has to send, and I thought it would be just the same as it sends 'page', 'rows' and 'sord'. But I'm missing something, because, for example, I can get 'page', 'rows' and 'sord' using: $limit = $this->getRequest()->getParam('rows', 10); but I get nothing by using: $params = $_REQUEST['filters'] or $params = $this->getRequest()->getParam('sFilter'); I'm using PHP, Zend and json. I didn't post any code because my doubt is kind of generic, but I will do it if it was needed. I've searched a lot, and read the documentation, but I just don't see it. I will appreciate your help, thanks!

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13  | Next Page >