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

Some questions on subgrid #67

Closed LuckyRiver closed 10 years ago

LuckyRiver commented 10 years ago

Hi,

  1. I tried to play around with the subgrid but could not know how to retrieve information of subgrid row. The below code works for the main grid though.

    buttons: [{ title: 'Show selected', onClick: function(){ var models = this.view.getSelectedModels(); if( !.isEmpty(models)) { alert(.first(models).get('name')); } else { alert('Nothing'); } } }]

I like to use the same for subgrid to be able to retrieve the value of a column of the subgrid row but don't know what code I should put there. Basically I like to retrieve info of the main grid row and info of the subgrid row so I can send those infos to a rest service as something below

http://url:port/restservice/action/column[maingrid{rowid}]/column[subgrid/{rowid}]

  1. I have also other issues like I don't see the + and - icons though the example on jsfiddle displays them correctly? Any idea why I've this issue?
  2. And last, I use the same code as the example subgridCollection.reset(collection.where({'company' : companies.at(rowid).get('company')}));

but I don't know why it has to be "company" as the keyword, I've tried to use other name than company but it never loads the subgrid datas, for some reasons, it has to be company as name in my json feed.

Any help is appreciated.

Thanks!

LuckyRiver commented 10 years ago

Hi again. Figured out how to retrieve the subgrid row value. Still need help on the plus/minus signs icons not shown up and the company key word.

direct-fuel-injection commented 10 years ago

Hi, could you upload full example on fiddle or whatever, thank you.

LuckyRiver commented 10 years ago

Thanks for replying. I sorted it out but ended up using an another plugin due to its incompatibility with bootstrap 3. Also I needed something which can support server side pagination.