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

  • Home
  • SEARCH
  • 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 9157485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:01:42+00:00 2026-06-17T13:01:42+00:00

I have been testing out openjs grid v2.1 – starting by modifying the ajax.php

  • 0

I have been testing out openjs grid v2.1 – starting by modifying the ajax.php and index.php – i can get the grid to show the data, the delete function, sorting and navigation works but i cant seem to get the inline editing working, I’ve tried everything, watched youtube video of older versions, searched google, been trying for many hours – I’m stuck !

my table has a primary key ‘id’

ajax.php

<?php
    // connect to db
    mysql_connect("localhost","user","pass");
    mysql_select_db("db");

    // require our class
    require_once("grid.php");

    // load our grid with a table
    $grid = new Grid("phpbb_rivals_players", array(
        "save"=>true,
        "delete"=>true,
        "editing"=>true,
        "where"=>"Console = 'PS3'",
        "select" => 'selectFunction'
    ));

    // drop down function
    // if you have anonymous function support, then you can just put this function in place of
    // 'selectFunction'
    function selectFunction($grid) {
        $selects = array();

        // category select
        $grid->table = "phpbb_rivals_players";
        $selects["id"] = $grid->makeSelect("id","ForumID");

        // active select
        $selects["active"] = array("1"=>"true","0"=>"false");

        // render data          
        $grid->render($selects);
    }


?>

index.php

<!DOCTYPE html>
<html lang="en">
    <head>

        <link rel="stylesheet" href="bootstrap/css/bootstrap.css"/>

        <link rel="stylesheet" href="grid.css" title="openJsGrid"/>
        <!--<link rel="stylesheet" href="jquery-ui/css/smoothness/jquery-ui-1.8.22.custom.css"/>-->
        <script src="jquery.js" type="text/javascript"></script>
        <!--<script src="jquery-ui/js/jquery-ui-1.8.22.custom.min.js" type="text/javascript"></script>-->
        <script src="root.js"></script>
        <script src="grid.js"></script>

        <script type="text/javascript">
            $(function() {


                $(".users").grid({
                    title : "users",
                    page : 1,
                    showPager : true,
                    editing : true,
                    nRowsShowing : 10,
                    width: 800,
                    editing: true,
                    deleting : true
                }).on("loadComplete",function(e) {
                    //console.log("loadComplete", this.instance);
                }).on("cellClick",function(e, $cell) {
                    //console.log("cell",$cell);
                }).on("rowCheck",function(e, $checkbox) {
                    //console.log("rowCheck",$checkbox);
                }).on("rowClick",function(e, $rows) {
                    //console.log("rowClick",$rows);
                });

            });
        </script>
    </head>
    <body>
        <h2>Players</h2>
        <table class="grid users" action="ajax.php">
            <tr>    
                <th col="id" width="50">id</th>
                <th col="ForumID">ForumID</th>
                <th col="GTPSN">GTPSN</th>
                <th col="Position">Position</th>
                <th col="Formation">Formation</th>
            </tr>
        </table>
    </body>
</html>

I want to be able to edit GTPSN, Position, Formation, Console etc…

  • 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-17T13:01:44+00:00Added an answer on June 17, 2026 at 1:01 pm

    The Developer was kind enough to respond to my question on github !

    In your table html, set type=”text” – it was omitted from the original documentation and will now be added.

            <table class="grid users" action="ajax.php">
            <tr>    
                <th col="id" width="50">id</th>
                <th col="ForumID">ForumID</th>
                <th col="GTPSN">GTPSN</th>
                <th col="Position">Position</th>
                <th col="Formation">Formation</th>
            </tr>
        </table>
    

    should be

            <table class="grid users" action="ajax.php">
            <tr>    
                <th col="id" width="50">id</th>
                <th col="ForumID">ForumID</th>
                <th type="text" col="GTPSN">GTPSN</th>
                <th type="text" col="Position">Position</th>
                <th type="text" col="Formation">Formation</th>
            </tr>
        </table>
    

    Kudos to the developer of this great tool.. Excellent addition to anyone building a backend Admin Control panel !

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

Sidebar

Related Questions

I have been testing out a few different xml editor/viewers and I can't seem
I have just been testing out the facebook like box and was wondering if
I have been testing out using delegates instead of reflection for some object sorting
I have recently been testing out customer portals on Sites in Salesforce. Ideally I
I have been testing out some code and I need to load day view
I have been testing out the new WCF fileless activation stuff in .net 4
I have been testing out pandas and pytables for some large financial data sets,
I'm a newbie to C, and I have been testing my program out in
Ok. So I have been testing out a simple application on xcode to become
I am programming c# in VS2010 and have been testing out a plugin called

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.