All,
I'm trying to integrate flexigrid (http://www.webplicity.net/
flexigrid/). However I'm running to problems and I hope someone can
help me.

This is my snippet of flexigrid configuration:

...
url: '/populategrid/',
...

and the view is:
def populategrid(request):
    #page that is requested
    if request.POST.has_key('page'):
        pagenum = request.POST['page']
    else:
        pagenum = "1"
    #rows per page
    if request.POST.has_key('rp'):
        rp = int(request.POST['rp'])
    else:
        rp = 10
    rows = [{'id': row.id,
             'cell': [row.id, row.title, row.publisher, row.isbn]} for
row in Book.objects.all()]

    count = Book.objects.all().count()

    from django.utils import simplejson
    data = simplejson.dumps(dict(page=pagenum, total = count,
rows=rows))

    return HttpResponse(data, mimetype='application/javascript')

when I view http://localhost/populategrid/ it shows the dict values;
but the flexigrid doesn't show up any value. Can anyone help?

Thank you all,
Joseph
http://www.jjude.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to