Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7715431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:23:01+00:00 2026-06-01T02:23:01+00:00

I’ve following Grid to display data, now when I want to add new record

  • 0

I’ve following Grid to display data, now when I want to add new record it gives the error ‘NO URL IS SET’

$(document).ready(function () {
        $('#PRGrid').jqGrid({
            //url from wich data should be requested
            url: '@Url.Action("BindData")?FillType=' + getFillType(),
            //event for inline edit
            onSelectRow: function (currentSelectedRow) {
                if (currentSelectedRow && currentSelectedRow != $.lastSelectedRow) {
                    //save changes in row 
                    $('#PRGrid').jqGrid('saveRow', $.lastSelectedRow, false);
                    $.lastSelectedRow = currentSelectedRow;
                }
                //trigger inline edit for row
            },
            //type of data
            datatype: 'json',
            //url access method type
            mtype: 'POST',
            //columns names
            colNames: ['Code', 'Name', 'No_Rooms', 'Dept_Code', 'Total_Items'],
            //columns model
            colModel: [
                        {   name: 'Code', index: 'Code', align: 'left', width: '120px', editable: true, edittype: 'select', editoptions: { maxlength: 25, dataUrl: '@Url.Action("GetRooms")',
                            dataEvents: [{ 
                                type: 'change', fn: function (e) {
                                var ret = $.ajax({
                                url: '@Url.Action("selectRoom")?id=' + $(this).val(),
                                async: false,
                                success: function (ret) {
                                    $('#Name').val(ret.Name);
                                    $('#No_Rooms').val(ret.qty);
                                    $('#Dept_Code').val(ret.DeptCode);
                                    $('#Total_Items').val(ret.Total_Items);}
                                });}
                            }]
                        }},
                        { name: 'Name', index: 'Name', align: 'left', formatter: "text", width: '185px', editable: true, editrules: { required: true }, editoptions: { readonly: 'readonly'} },
                        { name: 'No_Rooms', index: 'No_Rooms', align: 'left', formatter: "text", width: '102px', integer: true, editable: true, editrules: { required: true }, editoptions: { readonly: 'readonly'} },
                        { name: 'Dept_Code', index: 'Dept_Code', align: 'left', formatter: "text", width: '78px', editable: true, editrules: { required: true }, editoptions: { readonly: 'readonly'} },
                        { name: 'Total_Items', index: 'Total_Items', align: 'left', formatter: "text", width: '82px', integer: true, editable: true, editrules: { required: true }, editoptions: { readonly: 'readonly'} },
                    ],
            //pager for grid            
            pager: $('#PRGridPager'),
            //number of rows per page
            rowNum: 5,
            //initial sorting column
            sortname: 'Code',
            //initial sorting direction
            sortorder: 'asc',
            recreateForm:true,
            //we want to display total records count
            viewrecords: true,
            //grid height
            height: '100%'
        });

        $('#PRGrid').jqGrid('navGrid', '#PRGridPager',
                { add: true, del: true, edit:false, search: true },
                {width: '330', url:'@Url.Action("InsertPRGridRecord")', closeAfterAdd: true },
                {width: '330', url:'@Url.Action("DeleteGridRecord")'});

        var dialogPosition = $(this).offset();

Problem arrise when I want to add or delete the record from the grid,

Here I’ve defined both the methods InsertPRGridRecord() and DeleteGridRecord(), but it gives the same error ‘NO URL IS SET’ at the time of submitting the data on Add Record or Delete Record dialog.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:23:02+00:00Added an answer on June 1, 2026 at 2:23 am

    I think the problem exist because you use incorrect the parameters of navGrid. Your current code uses '@Url.Action("DeleteGridRecord")' as URL of “Add” and '@Url.Action("InsertPRGridRecord")' as URL of “Edit”. The URL of “Delete” is not specified.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I want to construct a data frame in an Rcpp function, but when I
i want to parse a xhtml file and display in UITableView. what is the
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.