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 9012867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:06:38+00:00 2026-06-16T03:06:38+00:00

I am trying to use JQgrid and edit my objects. However, I don’t know

  • 0

I am trying to use JQgrid and edit my objects. However, I don’t know how to pass parameters to the server side code. Here is my jq code:

 jQuery("#tblList").jqGrid({
            url: 'CityList.aspx/GetList',
            editurl: 'CityList.aspx/GetList',
            mtype: 'POST',
            datatype: 'json',
            postData: { searchString: '', searchField: '', searchOper: '' },
            ajaxGridOptions: { contentType: "application/json" },
            serializeGridData: function (postData) {
                var propertyName, propertyValue, dataToSend = {};
                for (propertyName in postData) {
                    if (postData.hasOwnProperty(propertyName)) {
                        propertyValue = postData[propertyName];
                        if ($.isFunction(propertyValue)) {
                            dataToSend[propertyName] = propertyValue();
                        } else {
                            dataToSend[propertyName] = propertyValue
                        }
                    }
                }
                return JSON.stringify(dataToSend);
            },
            jsonReader: {
                root: "d.rows",
                page: "d.page",
                total: "d.total",
                records: "d.records"
            },
            colNames: ['Id', 'Şehir Adı'],
            colModel: [
                { name: 'CityId', index: 'CityId', hidden: true },
                { name: 'Name', index: 'Name', width: 400, editable: true, edittype: 'text' }
            ],
            ondblClickRow: function (id) { alert("You double click row with id: " + id); },
            pager: '#tblPager',
            rowList: [10, 20, 30],
            sortname: 'CityId',
            sortorder: 'desc',
            rowNum: 10,
            loadtext: "Yukleniyor....",
            shrinkToFit: false,
            multiselect: false,
            emptyrecords: "Kayit Bulunamadi",
            autowidth: true,
            shrinkToFit: true,
            height: "400",
            rownumbers: true,
            //subGrid: true,
            caption: 'Şehirler'
        }).navGrid('#tblPager', { add: true, edit: true, del: true, reload: true });

    });
    jQuery("#tblList").editGridRow(rowid, properties);

I am new to jqGrid, Can you tell me how I can edit my records?

  • 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-16T03:06:39+00:00Added an answer on June 16, 2026 at 3:06 am

    I set up the DataRequesting event:

    in the code behind-

        public void JQGridVets_DataRequesting(object sender, JQGridDataRequestEventArgs e)
        {
            ObjectDataSourceVets.SelectParameters["BusID"].DefaultValue = e.ParentRowKey;
            ObjectDataSourceVets.InsertParameters["BusID"].DefaultValue = e.ParentRowKey;
        }
    

    in the aspx file –

    <asp:ObjectDataSource ID="ObjectDataSourceVets" runat="server" 
            SelectMethod="GetVetAll" TypeName="AHP.Data.PhoneBookRepository" 
            UpdateMethod="UpdateVet" InsertMethod="InsertVet" 
            OldValuesParameterFormatString="original_{0}"  >
            <InsertParameters>
                <asp:Parameter Name="FirstName" Type="String" />
                <asp:Parameter Name="M" Type="String" />
                <asp:Parameter Name="LastName" Type="String" />
                <asp:Parameter Name="vetphone" Type="String" />
                <asp:Parameter Name="vetemail" Type="String" />
                <asp:Parameter Name="Degree" Type="String" />
                <asp:Parameter Name="License" Type="String" />
                <asp:Parameter Name="Code" Type="String" />
                <asp:Parameter Name="BusID" Type="String" />
                <asp:Parameter Name="oper" Type="String" />
                <asp:Parameter Name="id" Type="String" />
            </InsertParameters>
            <SelectParameters>
                <asp:Parameter Name="BusID" Type="String" />
            </SelectParameters>
            <UpdateParameters>
                <asp:Parameter Name="FirstName" Type="String" />
                <asp:Parameter Name="M" Type="String" />
                <asp:Parameter Name="LastName" Type="String" />
                <asp:Parameter Name="vetphone" Type="String" />
                <asp:Parameter Name="vetemail" Type="String" />
                <asp:Parameter Name="Degree" Type="String" />
                <asp:Parameter Name="License" Type="String" />
                <asp:Parameter Name="Code" Type="String" />
                <asp:Parameter Name="VetID" Type="String" />
            </UpdateParameters>
        </asp:ObjectDataSource>
    

    so in the InsertMethod specified in the ObjectDataSource the busid has the correct value.

    This is used to add a child record from a subgrid.

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

Sidebar

Related Questions

I'm trying use self-signed certificate (c#): X509Certificate2 cert = new X509Certificate2( Server.MapPath(~/App_Data/myhost.pfx), pass); on
I am trying to use the edit delete functions in jqgrid. I can't seem
I'm using jqgrid 3.8.2, I'm trying to use below code to reload data from
I am trying to use jqgrid inline edit function. But I got the whole
i'm trying to use jQuery multiselect plugin in a form editing jqGrid (add form).
I am need paint my image. I'm trying use JQuery in here this link:
I am trying to use jqGrid within a form where the user fills out
I'm trying to use form editing on jqgrid. When the data is changed, data
I'm trying to use form editing on jqgrid. When the data is sent to
I am using the latest jqgrid 4.3.1 and I am trying to use frozen

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.