Note that there are some explanatory texts on larger screens.

plurals
  1. POmultiple edit and delete buttons on jqGrid reload
    primarykey
    data
    text
    <p>i m using jqGrid along with asp.net mvc2... the problem is that i m calling a grid on button click event.. now evertime if i click the button the grid is getting reloaded but the edit and refresh buttons are displayed more than once.. how to solve this problem? here is the image <img src="https://i.stack.imgur.com/JtipR.png" alt="alt text"></p> <pre><code>function BindGrid() { if (!firstClick) { $("#list").trigger("reloadGrid"); } firstClick = false; /* Refreshes the grid */ $("#list").jqGrid({ url: '&lt;%= Url.Action("GetScheduleInfo", "TouchSchedule") %&gt;', datatype: 'json', mtype: 'GET', postData: { StartDate: $('#StartDate').val(), EndDate: $('#EndDate').val(), siteId: $('#ListFacility') ? $('#ListFacility').val() : -1 }, colNames: ['SiteID', 'Cal Date', 'Store Open', 'Start Time', 'End Time', 'MileageLimit AM', 'MileageLimit PM', 'TouchLimit PM', 'TouchLimit AM', 'Total Touches', 'Total Mileage', 'IsWeekend'], colModel: [ { name: 'SiteID', index: 'SiteID', width: 40, align: 'left', /* key: true,*/editable: false, editrules: { edithidden: false }, hidedlg: true, hidden: false }, { name: 'CalDate', index: 'CalDate', width: 100, align: 'left', formatter: 'date', datefmt: 'm/d/Y', editable: true, edittype: 'text', editrules: { required: true, date: true }, formoptions: { elmsuffix: ' *'} }, { name: 'StoreOpen', index: 'StoreOpen', width: 40, align: 'left', editable: true, edittype: 'select', formatter: 'select', editrules: { required: true }, formoptions: { elmsuffix: ' *' }, editoptions: { dataInit: function (elem) { $(elem).empty() .append("&lt;option value='1'&gt;o&lt;/option&gt;") .append("&lt;option value='2'&gt;c&lt;/option&gt;"); } } }, { name: 'StartTime', index: 'StartTime', width: 100, align: 'left', formatter: 'date', datefmt: 'g:i A', editable: true, edittype: 'text', editrules: { required: true, date: true }, formoptions: { elmsuffix: ' *'} }, { name: 'EndTime', index: 'EndTime', width: 100, align: 'left', formatter: 'date', datefmt: 'g:i A', editable: true, edittype: 'text', editrules: { required: true }, formoptions: { elmsuffix: ' *'} }, { name: 'MileageLimitAM', index: 'MileageLimitAM', width: 50, align: 'left', editable: true, edittype: 'text', editrules: { required: true }, formoptions: { elmsuffix: ' *'} }, { name: 'MileageLimitPM', index: 'MileageLimitPM', width: 50, align: 'left', editable: true, edittype: 'text', editrules: { required: true }, formoptions: { elmsuffix: ' *'} }, { name: 'TouchLimitAM', index: 'TouchLimitAM', width: 50, align: 'left', editable: true, edittype: 'text', editrules: { required: true }, formoptions: { elmsuffix: ' *'} }, { name: 'TouchLimitPM', index: 'TouchLimitPM', width: 50, align: 'left', editable: true, edittype: 'text', editrules: { required: true }, formoptions: { elmsuffix: ' *'} }, { name: 'TotalTouches', index: 'TotalTouches', width: 50, align: 'left', editable: true, edittype: 'text', editrules: { required: true }, formoptions: { elmsuffix: ' *'} }, { name: 'TotalMileage', index: 'TotalMileage', width: 50, align: 'left', editable: true, edittype: 'text', editrules: { required: true }, formoptions: { elmsuffix: ' *'} }, { name: 'IsWeekend', index: 'IsWeekend', width: 200, align: 'left', editable: false, hidden: false} ], pager: $('#listPager'), rowNum: 10, rowList: [10, 20, 30], sortname: 'CalDate', sortorder: "desc", viewrecords: true, caption: 'Schedule Calendar', autowidth: true, afterInsertRow: function (rowid, rowdata) { if (rowdata.IsWeekend) $(this).jqGrid('setRowData', rowid, false, { color: 'blue' }); } }).navGrid('#listPager', { edit:true, add:false, del:false, search:false, refresh:true }); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload