very nice!

how can a cell be made a drop down selection with values from db ?


On Jul 3, 10:48 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> with that looks like this:http://www.web2py.com/examples/spreadsheet
>
> On Jul 3, 3:40 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > sheet['cell_name'].size=4 # is the default. You will have to change it
> > for every cell or change it in sheet.py
> > Here is a much better index html that makes it look more like Excel:
>
> > {{extend 'layout.html'}}
>
> > <style>
> > /*
>
> >    the code in this page is here just to provide an example
> >    none of the css markup and script is required for the sheet to
> > function
> >    it is required to make it look good and can be further customized
>
> > */
> > .sheet td {
> >     text-align: left;
> >     vertical-align: top;
> >     padding: 0 0 0 0;
> >     border: 0 0 0 0;
> >     spacing: 0 0 0 0;}
>
> > .sheet input {
> >     border: 0;}
>
> > td.colhead, td.rowhead {
> >     background-color: #bbbbbb;
> >     padding-left: 5px;
> >     padding-right: 5px;}
>
> > td.rowhead {
> >     width: 30px;
> >     text-align: right;}
>
> > </style>
>
> > <form>
> >   <div class="sheet">
> >   <table>
> >     <tr>
> >       <td class="colhead" id="selected_cell"></td>
> >       <td colspan="{{=sheet.cols}}">
> >         <input readonly id="formula" size="{{=6*sheet.cols}}px"/>
> >       </td>
> >     </tr>
> >     <tr>
> >       <td class="colhead"></td>
> >       {{for c in xrange(sheet.cols):}}
> >       <td class="colhead">c{{=c}}</td>
> >       {{pass}}
> >     </tr>
> >     {{for r in xrange(sheet.rows):}}
> >     <tr>
> >       <td class="rowhead">r{{=r}}</td>
> >       {{for c in xrange(sheet.cols):}}
> >       <td class="cells">
> >         {{=XML(sheet.nodes['r%sc%s'%(r,c)].xml())}}
> >       </td>
> >       {{pass}}
> >     </tr>
> >     {{pass}}
> >   </table>
> >   </div>
> > </form>
>
> > <script>
> >   function update_formula(t) {
> >      if(t) {
> >       jQuery('#selected_cell').html(jQuery(t).attr('id'));
> >       jQuery('#formula').val(jQuery(t).val());
> >      } else {
> >       jQuery('#selected_cell').html('');
> >       jQuery('#formula').val('');
> >      }
> >   };
> >   jQuery('.cells input').focus(function(){update_formula(this);});
> >   jQuery('.cells input').keyup(function(){update_formula(this);});
> >   jQuery('.cells input').blur(function(){update_formula(null);});
> > </script>
>
> > On Jul 3, 2:47 pm, Hans <johann.scheibelho...@easytouch-edv.com>
> > wrote:
>
> > > great stuff massimo!!!
>
> > > how can the size of the cells be adjusted? Basically I want wider
> > > cells.
>
> > > Thanks,
> > > Hans
>
> > > On Jul 3, 4:16 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > > Do you need to embed an ajax spreadsheet in you app. Now you have it:
>
> > > >http://www.vimeo.com/5432441http://www.web2py.com/appliances/default/...
>
> > > > Please let know about bugs
>
> > > > Massimo
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to