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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:58:14+00:00 2026-05-26T21:58:14+00:00

I have one scenario in which I want to apply both form editing and

  • 0

I have one scenario in which I want to apply both form editing and inline editing for same jqgrid. I have two users for example one id Admin and other is user and company is a jqgrid. now I want to apply form editing for Admin and inline editing for User for company Jqgrid. I am using JSP scriptlets for specify whether it is Admin or User.

Is anyone knows how can I able to implement this please?

@updated :

onSelectRow: function(id){                           
                var userType='<%=userDetails[1]%>';
                alert("userType= " + userType);
                if(userType === 'Company Administrator'){                   
                       jQuery('#companyList').jqGrid('editRow',id,true,inlineEditSuccess);                      
                }
           }
  • 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-05-26T21:58:14+00:00Added an answer on May 26, 2026 at 9:58 pm

    The implementation seems me clear. You need just set on the server side a JavaScript variable which will describe which editing mode the user can use. You can even allow some user editing and another not.

    If you not want to allow any kind of form editing for some use you can test the value of the corresponding variable and call navGrid depend on the value:

    if (my.formEditing) {
        $("#list").jqGrid('navGrid', '#pager', ....);
    }
    

    or you can use

    if (my.formEditingOn) {
        $("#list").jqGrid('navGrid', '#pager',
            {edit: my.formEditOn, add: my.formAddOn, add: my.formDelOn}, ....);
    }
    

    If you would use the trick described in the answer (see the demo) you can call ‘navGrid’ and create all navigator buttons, but make only selected buttons visible depend on the user’s permissions.

    In case of usage of inline editing you can use something like

    onSelectRow: function (id) {
        if (!my.inlineEditing) {
            return;
        }
        //...
        $(this).jqGrid('editRow', id, ...);
    }
    

    The initializing of the my variable can be different depend on the technology which you use on the server side. In the simplest the my variable can be define as global on the page so it can be defined on the top level. In case of ASP.NET MVC the code can look like the following:

    <%@ Page ...
    ...
    <asp:Content ID="Content3" ContentPlaceHolderID="head" runat="server">
    
    <%-- first include script which defines global my object based on the user rights --%>
    <script type="text/javascript">
        // initialize my based of Model properties filled 
        var my = {
            inlineEditing : ..,
            formEditOn : ...,
            formAddOn : ...,
            formDelOn : ...
        }
    </script>
    
    <%-- now include the main script which uses jqGrid --%>
    <script type="text/javascript" src="<%= Url.Content(scriptPath) %>"></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have one scenario where we don't want to change the server JVM which
Scenario 1: I have one wrapper Perl script which uses another Perl module and
I have a scenario where i have one control, which is using another control
I have a scenario in which I have to run multiple commands one after
The Scenario which i have thought and which i want to do is that
The Scenario which i have thought and which i want to do is that
If we have just one element on which we have to apply css or
I have a scenario in which there are multiple iframes/frames open in one web
I have a remote Git server, here is the scenario which I want to
I have senario in which one view and view has binding with multiple ViewModel.

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.