direct-fuel-injection / bbGrid

Grid system on Backbone.js and Bootstrap, sure jQuery :)
http://direct-fuel-injection.github.com/bbGrid
138 stars 59 forks source link

How to change the view? #40

Closed blpraveen closed 10 years ago

blpraveen commented 10 years ago

Is to possible to show the rows as lists. I am working in building an lists of locations to visits and I want the list to be switchable in grid or list.

direct-fuel-injection commented 10 years ago

Explain more pls. Any examples.

blpraveen commented 10 years ago

Unable to access ftp. Please send the ftp details

On Sat, Jan 4, 2014 at 9:32 PM, Алексей notifications@github.com wrote:

Explain more pls. Any examples.

— Reply to this email directly or view it on GitHubhttps://github.com/direct-fuel-injection/bbGrid/issues/40#issuecomment-31581481 .

Thank You, B L Praveen

Like, Follow, & B L Praveen on Facebook https://www.facebook.com/bl.praveen22 | Twitter http://twitter.com/blpraveen/

[IMAGE]Confidentiality Notice: The information contained in this e-mail and any attachments may be legally privileged and confidential. If you are not the intended recipient, you are notified that any distribution or copying of this e-mail is prohibited. If you have received this in error, please notify me and permanently delete the e-mail and any attachments. You should not retain, copy or use this e-mail or any attachment, nor disclose the contents to any other person. Thank you

blpraveen commented 10 years ago

I want switch views show the the data in grid or list . Is it is possible

nmoadev commented 10 years ago

Yes, I am currently exploring a technique for this using my own backbone views. @direct-fuel-injection did a good job of leaving this aspect of bbGrid flexible. This example assumes you know how to make your own backbone views. Probably this solution needs more to be viable.

So far I've tried this:

var MyGrid = new bbGrid.View({
  .........
   onRowExpanded: function($el, rowid) {
        var subView = new MyPropertyView({
            model: this.collection.get(rowid).subModel,
            el: $el
        });
        subView.render();
    }
    ........