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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:40:53+00:00 2026-06-15T23:40:53+00:00

I am using the rather nice javascript library Recline http://okfnlabs.org/recline/ it is build around

  • 0

I am using the rather nice javascript library Recline http://okfnlabs.org/recline/ it is build around Backbone. It also uses SlickGrid.

There are quite a number of examples and of course there is the source code to have a look at too. I have got quite a long way on my own – writing my own backend and showing the data in a slickgrid view.

However one thing I cannot find in the examples is how to append a record to a dataset. I would like to bind the action to a button, so I can append an empty record on the end of the dataset, so I can then use the slickgrid view to edit the data.

The only way I seem to be able to add a record is to round trip to the server, but I don’t want to have to do that, since that would involve having to post valid data since in reality I don’t want blank rows in my dataset. I would like to have the possbility to add a few rows on the browser client before actually posting the data via REST to the server.

The code looks like this at the moment.

$(document).ready(function() {
var dataset = new recline.Model.Dataset({
     url: '/rest/monitors',
     backend: 'restlet',
    });

    dataset.fetch().done(function(dataset) { 



        var $el = $('#mygrid');
        var grid = new recline.View.SlickGrid({
          model: dataset,
          el: $el,
          state: {
                gridOptions: {editable: true,enableCellNavigation: true},
                columnsEditor: [
                             {column: 'monitoruntil', editor: Slick.Editors.Date },
                             {column: 'enabled', editor: Slick.Editors.Checkbox },
                             {column: 'owneremail', editor: Slick.Editors.Text},
                             {column: 'normalinterval', editor: Slick.Editors.Text}
                           ],
                columnsWidth:[{column: 'owneremail', width: 100},{column: 'url', width: 300},{column: 'lastaccessed', width:100 }]
                 }
        });
        grid.visible = true;
        grid.render();


        //Bind Save Button to a function to save the dataset

        $('#savebutton').bind('click', function() {
              //alert($(this).text());
              dataset.save();
            });

        });;

} )

With this code I can only edit and save existing records which have been delivered with the “restlet” backend.

  • 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-15T23:40:54+00:00Added an answer on June 15, 2026 at 11:40 pm

    It looks you looking for dataset.records.add()

    try here in dev console:

    var dataset = new recline.Model.Dataset({
          records: [
            {id: 0, date: '2011-01-01', x: 1, y: 2, z: 3, country: 'DE', title: 'first', lat:52.56, lon:13.40},
            {id: 1, date: '2011-01-01', x: 1, y: 2, z: 3, country: 'DE', title: 'first', lat:52.56, lon:13.40},
        ]
        });
    createExplorer(dataset);
    var i=2;
    setInterval(function() {dataset.records.add({id: i, date: '2011-01-01', x: 1, y: 2, z: 3, country: 'DE', title: 'first', lat:52.56, lon:13.40});i++;},2000);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a rather nice iPhone date control for a iPhone only website
I've just starting using JAutodoc which is really rather nice. I'm now customizing the
Im trying to find out a good JavaScript library that can create a nice
I am using a rather old verision of exist at work. I'd love to
I want to write an application using openstreetmaps rather than mkmapview, but I'm not
I've been reading a fair bit about the performance of using LINQ rather than
I have a strange behaviour. I am using a rather heavy page (4000 nodes)
Rather than using WMI to obtain the last boot time, I wanted to calculate
rather than using a textnode to show content im trying to figure out how
This question is related to this SO post Rather than using a recursive CTE

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.