Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(document).ready(function() {
- $('#btnSubmit').click(function() {
- /* Refreshes the grid */
- $("#list").jqGrid({
- /* The controller action to get the grid data from */
- url: '/CRA/AddPart',
- data: { partNumber: "123"},
- datatype: 'json',
- mtype: 'GET',
- /* Define the headers on the grid */
- colNames: ['col1', 'col2', 'col3', 'col4'],
- /* Define what fields the row columns come from */
- colModel: [
- { name: 'col1', index: 'invid', width: 290 },
- { name: 'col2', index: 'invdate', width: 290 },
- { name: 'col3', index: 'amount', width: 290, align: 'right' },
- { name: 'col4', index: 'tax', width: 290, align: 'right'}],
- height: 'auto',
- rowNum: 10,
- rowList: [10, 20, 30],
- sortname: 'id',
- sortorder: "desc",
- viewrecords: true,
- imgpath: '../../Scripts/jgrid/themes/steel/images',
- caption: 'Core Return Authorization Contents:',
- cellEdit: true
- });
- });
- });
- </script>
- <script type="text/javascript">
- var firstClick = true;
- $(document).ready(function() {
- $('#btnSubmit').click(function() {
- if (!firstClick) {
- $("#list").trigger("reloadGrid");
- }
- firstClick = false;
- /* Refreshes the grid */
- $("#list").jqGrid({
- /* The controller action to get the grid data from */
- url: '/CRA/AddPart',
- data: { partNumber: "123"},
- datatype: 'json',
- mtype: 'GET',
- /* Define the headers on the grid */
- colNames: ['col1', 'col2', 'col3', 'col4'],
- /* Define what fields the row columns come from */
- colModel: [
- { name: 'col1', index: 'invid', width: 290 },
- { name: 'col2', index: 'invdate', width: 290 },
- { name: 'col3', index: 'amount', width: 290, align: 'right' },
- { name: 'col4', index: 'tax', width: 290, align: 'right'}],
- height: 'auto',
- rowNum: 10,
- rowList: [10, 20, 30],
- sortname: 'id',
- sortorder: "desc",
- viewrecords: true,
- imgpath: '../../Scripts/jgrid/themes/steel/images',
- caption: 'Core Return Authorization Contents:',
- cellEdit: true
- });
- });
- });
- </script>
Add Comment
Please, Sign In to add comment