Advice on creating a custom gridview - asp.net

I would like to create an order form for my ASP.net page (I included an example image below). However I don't know how to approach this. I'm assuming the best method would be a gridview but it would involve two levels of grouping. Other requirements would be be to accept a quantity and then calculate the total price. Can anyone point me to some good books or websites that explain creating custom grid views like this (or maybe a better method than using gridview, I'm open to whatever).
I consider myself to be an intermediate programmer in asp.net. I understand a lot of the concepts but I'm trying to learn more practical ways of doing things. Thanks for any knowledge you can provide!

Use a ListView, for two reasons:
It will produce clean markup
Using templates will give you the layout you desire
Here's an example of the type of layout you are after and how to achieve it:
ListView Web Server Control Overview

Related

Generic re-usable gridview with sorting,paging, filtering for asp.net web application

I have been given a task of creating a common Gridview component which has following features:
Paging
sorting
Filtering
The objective is to reuse the component in almost all the web pages (.aspx), so that the look and feel, layout and behaviour remains uniform across the web site.
The grid has to be lightweight, preferably ajax based. I had several thoughts in mind:
extend the current asp.net Gridview component.
Implement a very own custom solution with ajax method pulling data, rendering happens on client side using some jquery templates..etc.
I am not sure where to start with. The requirements i have been give just says that create a common Grid component so that all others in my team can re-use the same component .
Please give me insight into which way I should approach the implementation so that in future this component is scalable as well as in the near future its re-usable across the site.
The jQuery plugin datatables.net is very light weight and has all the features you need. You could use that.
No need to reinvent the wheel, there are tons of opensource and pay grids out there to do what you wnat - Check out this grid (with complete source). One of the nice features is that you can add a toolbar which you could use for your filtering.
http://jqmvcgrid.codeplex.com/

Design tips for a search engine in asp.net/asp.net mvc which vaguely resembles a sharepoint view

Guys i am looking for some awesome tips for developing a page which allows users to search for stuff from the db with the view restricted to only certain columns and the data grouped by and sorted by certain columns..
the source in this case is pretty easy to figure out which is a class which retrieves the search results...kapish..
the view in this case is giving me nightmares as i do not want to write that disgusting piece of code which many asp guys are seemingly used to...overriding row created and data bound of gridview etc etc.... i am thinking of simply rendering a html table itself with the necessary preprocessing applied at the datatable level(group by, sortby etc etc on the in memory object retrieved from the paged results)
i need to know if my thought process so far is right or is there a cleaner way of doing the whole thing in asp.net/asp.net mvc etc etc
Congratulations for not wanting to write "disgusting piece of code"... I spent a few years doing just that and the whole overriding row created / bound / etc. thing is a nightmare.
Your source is a class - great. My preferred method would be to go down the jQuery route, use the jqGrid and write an MVC controller that uses your custom class. Or you could dynamically generate your own HTML table but if you have a lot of data I would save yourself the time and explore jqGrid instead. It doesn't have to be MVC - you could embed it into a standard asp.net website, it's just that the MVC approach makes life easier if you have to expand your application to do more things.

ExtJS bidirectional Data Binding? Or alternatives

I'm a pretty experienced Flex/.NET developer who is now learning html5/javascript. I've been playing with Ext Core and ExtJS for the last few weeks and I'm interested in whether/how folks are using these libraries to do bi-directional data binding on data that is not list based.
It seems like most of the binding support is directed at binding rows of data to grids. I'm interested in binding UI elements to arbitrary POJOs that are not list-based data.
Maybe I'm just not looking in the right places, but I'm not finding support for this.
I'm really interested in hearing what folks are doing in Ext OR what folks recommend as an alternative.
Although there is no out-of-the-box solution like the #Bindable from Flex for example, Extjs does offer the infrastructure to create bindings.
If you have a look at http://blog.dnet-ebusiness-suite.com/2012/03/data-binding-in-extjs-4-grid-form.html you'll see a demo for this where the models (filter instance and record instance, instances of Ext.data.Model managed or NOT managed by a store) are bound to different views. The functionality is achieved with a thin framework built on top of Extjs.
On the other hand, to bind arbitrary POJOs is exactly the same story, those have to implement an Observable and fire themselves some property change events which can be listened. The blog posts and the framework itself gives a good starting point on how to do this.
Another way/concept is http://www.sencha.com/forum/showthread.php?60809-Ext.ux.data.BindMgr-Databind-Manager which i used with extjs 3 and works fine.
A follow up... I never did find an ExtJS approach and moved on to other js frameworks/approaches and along the way learned about knockout: http://knockoutjs.com/ which is pretty darned awesome!
Are you looking for the BasicForm functionality? (Particularly: loadRecord)
If you want readonly display you can use DisplayFields or disabled TextFields or similar.
Take a look at jQXB , http://www.jqxb.altervista.com. It's seems to provides a very easy and powerfull api to bind data with html elems

ASP.net wizard Design

I have requirement to create an asp.net wizard control which will be re usable in a number of projects. I do not wish to use the out of the box ASP.net wizard control as for the number of pages etc for the systems it is too basic. At the moment i am trying to come up with a good re-usable extensible design which will be easily implemented accross multiple systems. Wondering if others have done someting similar to this?? have any gotchas, advice etc for the design? Examples etc??
thanks
Niall
Went with the asp wizard control and customising to suit needs. Very happy with the results. Easy control to work with and easy to extend and modify all areas by implementing custom itemplate classes

Looking for examples of simple web-based form designers

I have a requirement to implement a "simple" web-based form designer that allows "simple" users to create their own web-based forms. I've come across these things in rich clients, such as Outlook and Acrobat, but my requirements are much simpler and must be web-based.
Pretty layout, custom validation, complex fields and types are simply not a factor. Ideally I would like to find something that is neat like this very SO question composer, in which I'm typing right now, plus the ability to drag a text input box or a checkbox right into the text. Output could be as crude as this:
What is your name? [Fred Bloggs]
Do you have an internet? [x]
I'm using asp.net but the backend technology doesn't really matter as I fear this is all javascript! No need to consider old browsers. Any examples links would be helpful, as well as suggestions for existing open or commercial components. Thank you!
Tried Frevvo ?
Here is a pretty neat one based on jquery Ajax Form Builder
Try FormThis. It allows you to create an Online Web Form at no cost. Drag & Drop designer, Unlimited Fields, Submit/Responses, Calculations, Validation, etc. Can output to PDF if required.

Resources