datazenit / sensei-grid Goto Github PK
View Code? Open in Web Editor NEWSimple and lightweight data grid in JS/HTML
Home Page: https://datazenit.com/static/sensei-grid/examples/index.html
License: MIT License
Simple and lightweight data grid in JS/HTML
Home Page: https://datazenit.com/static/sensei-grid/examples/index.html
License: MIT License
When I save a cell into base I use editor:save event
grid.events.on("editor:save", function (data, $cell) {
console.info("Column:", '@'+grid.getCellColumn($cell)+'@');
jQuery.ajax({
type: "POST",
url: "upd.php",
dataType:"text",
data:'ID='+grid.getRowData(grid.getCellRow($cell))["ID"]+'&Val='+grid.activeEditor.getValue()+'&Pole='+grid.getCellColumn($cell)+'&Text='
});
});
What is the best solution to save a new row to DB? When I add a new row I type something cell by cell. So it use editor:save event instead others.
Plus, think its a good idea to have OS X style undo (โ + Shift + Z)
Hi! Thanks for the great project. I can not find how to delete a row ( Can you help pls
"z","y" - letters that I can not type in cell. (also on another language).
Temp fix: delete "90, 89" from "var codes = [8, 9, 13, 27, 37, 38, 39, 40, 90, 89, 68];" but it disables undo/redo actions.
If you have a big datasheet that you want to edit, you may want to keep an ID-column to your left that's always visible.
And for the same reason, if you're further down the sheet, you may want to see the column names aswell.
Example on pinned column schema:
{ "name": "id", "type": "int", "pinned": true }
Hi, I'm consulting what method is used to get the html code of the whole grid with editor.
I tried with the method
$ ("#Grid"). Grid (). GetGridData ()
but it only returns the text without formatting and if I insert an image it does not appear.
As I should do to capture all the elements.
Thanks and regards.
How about undo operation support with keyboard shortcuts? :)
This is a great project. was wondering if you thought about supporting other widgets such as files/images ?
I can think of these two:
var authors = {"values": [
{"value": "1", "display": "Bob"},
{"value": "2", "display": "John"}
]};
var authors = {
"display": ["Bob", "John", "Alice", "Jane"],
"values": ["1", "TWO", "3", "4"]
};
I would like your thoughts before messing around and creating a PR
Any idea on an implementation for this?
Please try to click on different cells. It do multiple selection.
Hey guys, I love this idea and how lightweight this is, but I wanted to ask whether it is necessary for sensei-grid to be a jQuery plugin?
Does this:
$('#example').grid(data, columns)
add much value over this?
var container = document.getElementById('example')
grid(container, data, columns)
It seems like overall the JavaScript community is moving towards more standalone modules like this rather than jQuery plugins and just wanted to get your thoughts.
Do you think you will add an option "read only" for certain cells ? It will be very interesting !
bower jquery#~3.10.1 ENORESTARGET No tag found that was able to satisfy ~3.10.1
Thanks for this great library.
It seems like the biggest missing feature at the moment is an API for the user to change the columns: to edit the column header, to add columns, or to delete columns.
I was wondering if there were any plans for adding such APIs and/or UI. Obviously it can be implemented by simply reloading the entire table with modified data and column objects, but this would be an ugly user experience and it would be nice to have some widgets, etc. that were as slickly implemented as the rest of what you've done here.
Is this anything you're thinking of doing?
How about "Add new row" functionality?
Not all values in a td
can be represented as a string. E.g. I built a multi tag selector like the one you saw on stackoverflow.com.
In plugin.saveEditor
there's line
if (normalizeLineEndings(val) !== normalizeLineEndings($td.text()))
If the val
is something like ['tag1', 'tag2']
there would be an error.
When row:save (by pressing tab) event fires from the last column the value is missing from the data variable. Note if enter is pressed then the value is there.
From the example note the count column
If tab is pressed
author: "Bob"
body: ""
count: ""
created_at: ""
id: NaN
is_admin: "true"
status: ""
title: ""
If enter is pressed
author: "Bob"
body: ""
count: "55"
created_at: ""
id: NaN
is_admin: "true"
status: ""
title: ""
I'm wondering if I could use the editor:save event since it has the value?
First of all thanks for this awesome project Ive been using it in internal CRUD project and so far so good.
But last release is from last year, last commit from many months ago.
Are devs still actively working on this?
If not what are better alternatives?
Subj.
For Example, I want the value of the cell to be the ID(value) of the selected item, but I want it to display the text of that selected item in the cell.
Ideas:
I am going to start exploring how this could work in my personal Fork.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.