ASP.Net GridView Equivalent in Django

1,121 views
Skip to first unread message

Ian

unread,
Jun 4, 2008, 7:10:24 PM6/4/08
to Django users
I am .Net developer looking to switch over to Python.

I have started looking at Django and was wondering if there is a
widget equivalent to ASP.Net's GridView in terms of richness of
functionality.

If someone knows of any and has some examples of its use I would
greatly appreciate it.

Christian Joergensen

unread,
Jun 5, 2008, 3:14:08 AM6/5/08
to django...@googlegroups.com
Ian wrote:
> I am .Net developer looking to switch over to Python.
>
> I have started looking at Django and was wondering if there is a
> widget equivalent to ASP.Net's GridView in terms of richness of
> functionality.

What does ASP.Net's GridView do?

Regards,

--
Christian Joergensen
http://www.technobabble.dk

Gregor Müllegger

unread,
Jun 5, 2008, 3:49:27 AM6/5/08
to Django users
You are searching an UI Widget, is that right?

Django doesn't provide any builtin UI stuff, except the templatetages.
But you could try some of the following JavaScript libraries which
inculde UI stuff:

http://jquery.com/ with http://ui.jquery.com/
http://dojotoolkit.org/
http://extjs.com/ (i think this is the best for building "desktop
like" webapps, it also includes a GridView)

Brian Victor

unread,
Jun 5, 2008, 7:41:56 AM6/5/08
to django...@googlegroups.com
Ian wrote:
> I have started looking at Django and was wondering if there is a
> widget equivalent to ASP.Net's GridView in terms of richness of
> functionality.

I haven't seen anything like this implemented in django, and presumably
the reason for that is django lacks anything like ASP.NET's ViewState.
It's easy enough to make a table with templates, but it's not easy to
make a "control" within a page maintain its state like you can in
ASP.NET.

In my experience, though, you don't *really* need it that often. The
ViewState trick is neat for what it is, but it's rare that I have so
many controls on a page that it's unreasonable to persist their state in
the query string. Doing it that way has the added benefit of allowing
the user to copy the URL and get back to the same view.

It would probably even be possible to get most of the functionality you
want (using the query string) encapsulated in a template tag. I've
thought a couple of times about trying to do that, but haven't had
enough of a need to actually do it.

--
Brian

Chatchai Neanudorn

unread,
Jun 5, 2008, 9:34:15 AM6/5/08
to django...@googlegroups.com
themplatetag + django session (or caching), you can maintain state of variable.
 
I have a change to look at ASP.NET. For my understanding, it automatically generate
Javascript for developer, good if dont want to deal with javascript, for me it is bad idea.
 
ViewState, it keep state data in memory (or somewhere) to maintain 
the data to maintain the data.
 
For your question,  Why don't you try opensource javascript framework and use
django session.
 
For Javascript, see above.
 

Regards,
 
For Django, you can do wantever you want, with your way.
 
Regards
 
Chatchai
2008/6/5 Brian Victor <homeu...@brianhv.org>:

Chris Scott

unread,
Jun 5, 2008, 9:39:43 AM6/5/08
to django...@googlegroups.com

On Jun 5, 2008, at 9:34 AM, Chatchai Neanudorn wrote:

> themplatetag + django session (or caching), you can maintain state of
> variable.
>
> I have a change to look at ASP.NET. For my understanding, it
> automatically
> generate
> Javascript for developer, good if dont want to deal with javascript,
> for me
> it is bad idea.
>
> ViewState, it keep state data in memory (or somewhere) to maintain
> the data to maintain the data.
>
> For your question, Why don't you try opensource javascript
> framework and
> use
> django session.
>
> Django session http://www.djangoproject.com/documentation/sessions/
> For Javascript, see above.

The jQuery Grid View plugin may help if you go this route: http://plugins.jquery.com/project/jqGridView


> Regards,
>
> For Django, you can do wantever you want, with your way.
>
> Regards
>
> Chatchai
> 2008/6/5 Brian Victor <homeu...@brianhv.org>:
>
>>
>> Ian wrote:
>>> I have started looking at Django and was wondering if there is a
>>> widget equivalent to ASP.Net's GridView in terms of richness of
>>> functionality.
>>
>> I haven't seen anything like this implemented in django, and
>> presumably

>> the reason for that is django lacks anything like ASP.NET<http://asp.net/

>> >'s
>> ViewState.
>> It's easy enough to make a table with templates, but it's not easy to
>> make a "control" within a page maintain its state like you can in

>> ASP.NET <http://asp.net/>.


>>
>> In my experience, though, you don't *really* need it that often. The
>> ViewState trick is neat for what it is, but it's rare that I have so
>> many controls on a page that it's unreasonable to persist their
>> state in
>> the query string. Doing it that way has the added benefit of
>> allowing
>> the user to copy the URL and get back to the same view.
>>
>> It would probably even be possible to get most of the functionality
>> you
>> want (using the query string) encapsulated in a template tag. I've
>> thought a couple of times about trying to do that, but haven't had
>> enough of a need to actually do it.
>>
>> --
>> Brian

--
cs
http://iamzed.com/
http://hailtheale.com/

Reply all
Reply to author
Forward
0 new messages