News for hackers. Stuff that matters.
Re:Backgrid: A featureful grid UI for Backbone.js by wyuenho on Friday January 25, 2013 @05:16AM (#5114823)
Project author here. Ask me anything, constructive criticism much appreciated!

And much thanks goes Jeremy for writing Backbone.js and posting this!

(BTW, I'm looking for a job, so if anyone is interested, please email me myhnhandle [at] googlesmailservice dot com)

Re:Backgrid: A featureful grid UI for Backbone.js by kakuri on Friday January 25, 2013 @11:04AM (#5116012)
Chrome 24 / Win 7 - clicking in cells in the Date or Population columns changes the column width.
Re:Backgrid: A featureful grid UI for Backbone.js by wyuenho on Friday January 25, 2013 @12:02PM (#5116411)
Re:Backgrid: A featureful grid UI for Backbone.js by wheaties on Friday January 25, 2013 @09:32AM (#5115542)
Love it. Really! How difficult would it be to embed a D3 chart in one of the columns? Would that be something tricky to add or could it be made into a column type easily?
Re:Backgrid: A featureful grid UI for Backbone.js by wyuenho on Friday January 25, 2013 @09:43AM (#5115581)
Probably would be best implemented as an extension that can display a chart in a lightbox or something. Probably something akin to this:

http://wyuenho.github.com/backgrid/#api-text-cell

Re:Backgrid: A featureful grid UI for Backbone.js by kzahel on Friday January 25, 2013 @08:49AM (#5115330)
Can it handle say 1 million rows, by lazily creating the DOM elements when the scroll into view (like, say, SlickGrid)
Re:Backgrid: A featureful grid UI for Backbone.js by wyuenho on Friday January 25, 2013 @09:49AM (#5115615)
Can you read 1 million rows at a time like Neo :P

Jokes aside, no it cannot, not yet anyway. This is version 0.1 and I really have no intension of cloning SlickGrid. That said, the infrastructure is here

http://www.reddit.com/r/javascript/comments/176tvf/backgridj...

and avoiding DOM repainting is on the top of my list for version 0.2.

https://github.com/wyuenho/backgrid/issues/26

This should take only 3 lines of code.

PR welcome!

Re:Backgrid: A featureful grid UI for Backbone.js by zaider on Friday January 25, 2013 @09:36AM (#5115552)
This is really useful. Thank you. With the scrolling list would it be possible to make the header row stay in place? Some people prefer to scroll with large amounts of data so that they can just use ctr+f to quickly find the links to what they want.
Re:Backgrid: A featureful grid UI for Backbone.js by wyuenho on Friday January 25, 2013 @09:44AM (#5115587)
Re:Backgrid: A featureful grid UI for Backbone.js by elliottkember on Friday January 25, 2013 @06:28AM (#5114960)
Hey, great work! One thing I found - your MomentCell example seems to steal focus from the document. You can't blur it by clicking elsewhere, which means any other keystrokes (except escape or enter) on the page go directly to it.
Re:Backgrid: A featureful grid UI for Backbone.js by wyuenho on Friday January 25, 2013 @06:37AM (#5114974)
Stealing focus is intentional because I want you to correct your mistakes, this is the same for all other cell types that do validation.

But not giving up focus by clicking elsewhere is not. File me a bug and thanks!

Re:Backgrid: A featureful grid UI for Backbone.js by Jare on Friday January 25, 2013 @06:01AM (#5114909)
Looks excellent! I don't have an excuse to play with this right now, but I'm forwarding to a colleague that is going to love it. Can't say much more than big thanks for sharing your work.
Re:Backgrid: A featureful grid UI for Backbone.js by h2s on Friday January 25, 2013 @07:19AM (#5115083)
This is great, I think this is going to come in pretty handy for an upcoming project at work. What a great method of job hunting, I hope it works out!
Re:Backgrid: A featureful grid UI for Backbone.js by phineas on Friday January 25, 2013 @11:41AM (#5116273)
I am interested in the way you used your project to get possible job offers. Did it work? Please let me know, that way I can follow suit.
Re:Backgrid: A featureful grid UI for Backbone.js by wyuenho on Friday January 25, 2013 @12:01PM (#5116402)
1000s of people have done before. Why don't u do it anyway and find out?
Re:Backgrid: A featureful grid UI for Backbone.js by pault on Friday January 25, 2013 @10:14AM (#5115755)
Crashes safari on my iPhone 4s, iOS 5.1.1.
Re:Backgrid: A featureful grid UI for Backbone.js by wyuenho on Friday January 25, 2013 @10:20AM (#5115786)
Yeah the gh-pages website has too many grids and codemirror instances opened up at once. The examples really need to load lazily on mobile. Any help would be greatly appreciated.
Re:Backgrid: A featureful grid UI for Backbone.js by gourneau on Friday January 25, 2013 @11:54AM (#5116363)
Are you looking for a job in SF?
Re:Backgrid: A featureful grid UI for Backbone.js by wyuenho on Friday January 25, 2013 @12:00PM (#5116395)
Yes
Re:Backgrid: A featureful grid UI for Backbone.js by Swizec on Friday January 25, 2013 @05:55AM (#5114901)
Hey this looks really cool! The last time I rendered some data in a table I used d3.js, but this looks much simpler for the more advanced stuff.

Do you have cvs support? That would be nifty because large table datasets are usually in csv not in json, so it would be nice to skip this intermediate step.

By the way, how did you make the documentation? It looks really nice.

Re:Backgrid: A featureful grid UI for Backbone.js by wyuenho on Friday January 25, 2013 @06:17AM (#5114931)
No csv support. I didn't intent to make a full-blown web-based spreadsheet (but you never know :) ). The documentation is just plain old hand-coded HTML styled with Bootstrap + some well chosen header fonts. The code editor (not much of an editor now that I've put it in read only mode) is codemirror.
Re:Backgrid: A featureful grid UI for Backbone.js by charlysisto on Friday January 25, 2013 @06:07AM (#5114917)
Looks awesome. I wrote Backbone.grid last year, basically some view extensions with a much lower level approach and many unresolved issues. This is were backbone (and other MVC) shines I think. Hope to see similar stuff in ember.js angular.js and so on with nifty gems for easy generation of admin section. kudos
Re:Backgrid: A featureful grid UI for Backbone.js by tbranyen on Friday January 25, 2013 @08:32AM (#5115268)
Awesome work man, saw this last night and definitely want to get it hooked up with LayoutManager https://github.com/tbranyen/backbone.layoutmanager
Re:Backgrid: A featureful grid UI for Backbone.js by wyuenho on Friday January 25, 2013 @09:51AM (#5115628)
Thanks! I saw you saw it last night :D backbone.layoutmanager looks great too. Can't wait to see what awesome sauce the 2 projects can come up with!
Re:Backgrid: A featureful grid UI for Backbone.js by uruviel2001 on Friday January 25, 2013 @05:52AM (#5114895)
Hmm if I knew this existed literally a week ago I might have gone with backbone instead of Angular. Do you by accident know of an ediable-grid with angular directives and proper bindings?
Re:Backgrid: A featureful grid UI for Backbone.js by zenocon on Friday January 25, 2013 @08:02AM (#5115177)
Try ng-grid http://angular-ui.github.com/ng-grid/ -- to get editable cells, you just make your own cell template. Fairly straightforward. I just built something with this, and it worked out nicely.
Re:Backgrid: A featureful grid UI for Backbone.js by 47 on Friday January 25, 2013 @11:10AM (#5116047)
Examples does not show up on Chrome on Android 4.2.1. It shows a blank area instead of the grid.
Re:Backgrid: A featureful grid UI for Backbone.js by wyuenho on Friday January 25, 2013 @12:04PM (#5116421)
I don't have an Android on hand to play with, is there an error log u can send me?