Master Detail Nested Way - asp.net

I am using Visual Studio 2010 and need to design a master detail form like the following.
http://demos.devexpress.com/ASPxGridViewDemos/MasterDetail/MasterDetail.aspx
Any suggestions/free components or solutions which I can use to develop the similar interface?
thanks

You can accomplish the same effect by loading the controls into multiple UpdatePanel controls that are initially empty in each row of your table.
You would add the controls you need on-demand when the update panel is refreshing.
The DevExpress control is great though, try use this if you have the resources.

Related

How to implement custom paging in ASP.NET Gridview that has Command Buttons in VB.NET

I am currently trying to implement a gridview with custom paging. I've gotten this to work by following the tutorial on ASP Snippets, located here:
http://www.aspsnippets.com/Articles/ASPNet-GridView-Custom-Paging-with-PageSize-Change-Dropdown.aspx
This work well. However, I run into an issue. My gridview has template controls in it, which run code when used. For example, I have a button that, when clicked, replaces the cell contents with two different buttons. When I use the pagination technique given above, clicking on any template control (causing postback), erases my gridview. I realize that this is because I have to recreate the gridview on every postback because of the way the pagination is set up. However, when I recreate the gridview, the effects of my button are gone because it has been recreated. I'm not sure how to escape this..
Does anyone have any ideas?
For a specific pointed question,
I am looking to create a gridview with custom pagination that will allow for template controls and extended functionality.
Thank you
Generic information:
IDE: Visual Studio 2012
Language: VB.NET, ASP.NET
Database: SQL SERVER 2008 R2
I fixed this issue by programmatic ally resetting the states of my controls to match what they were before post-back.
I haven't had any issues since setting that up.

Which ASP.NET server control would you suggest for this?

I need to build a web page that has categorized data that looks like the screenshot below. Initially, I thought of using a Repeater or a DataList but I am not sure. Which ASP.NET control do you suggest? I am working on ASP.NET 4.0
Use a ListView. It will give you the functionality you need with the added benefit of clean markup using the templates.
http://weblogs.asp.net/scottgu/archive/2007/08/10/the-asp-listview-control-part-1-building-a-product-listing-page-with-clean-css-ui.aspx
Use nesting in the templates "if you really have to". Avoid nesting top-level controls like the ListView - totally unnecessary and a performance killer.

Ajax enabled sorting and paging on grid in ASP.NET 3.5

Is there any good solution for ajax enabled Grid with pageing and sorting which only brings the required data from database? I mean it should only bring the data from the database which is to be displayed on the particular page number of the grid.
I looked at this. It looks good. But I just thought if anyone has created something better using Google's or Yahoo's javascript library or using any good features of asp.net 3.5.
I'm replying my own question.
I found Ajax Data Controls as updated version of what I had specified in my question. Still I will not mark it as answer and will wait for better answer.
If you are using a datasource control (SqlDataSource, LinqDataSource etc) this would be done automatically (retrieving only the current page of data). To make paging and sorting ajax-enabled wrap the grid inside an UpdatePanel control.
I used devexpress grid. It has sorting, grouping and paging. It is not perfect one but looks nice and easy to use.

Ajax in existing asp .net project

I have a web page devoloped in visual studio 2008.
I have 4 dropdowns and a repeater in the page.based on the selection(search criteria) from the dropdowns the repeater value will change.
and one dropdown selection will bind values to the other dropdown also.
Since the page is causing a lot of postback we decided to implement ajax here.
I am yet to learn ajax.
Can anyone tell what is the best way to do this .which ajax control replace dropdowns?
i have already server side code written on all dropdowns.
Please give me a good solution which i can implement in less time and reuse my code.
One more update: i have a master page used in the project.
I am using update panel of ajax which does not work if i use master page.
(That means all the dropdown controls and repeater i put it in update panel.But still page postback occurs.)
In a normal page(without master page) it works? why is this happening?
Thanks
SNA
You are able to use UpdatePanel and place dropdowns inside it.
Your solution will depend on the AJAX framework you choose, but here are cascading dropdown examples in ASP.NET AJAX and jQuery
If your main reason for using AJAX is to remove the number of postbacks you are getting, then I would recommend against using Microsoft's built in solution, e.g updatepanels.
The learning curve will be higher but learn to use jQuery, maybe with a little help from jTemplate to help you build your drop downs on the page.
Using updatepanels will not reduce your postbacks as behind the scenes asp.net is doing a full page life-cycle, sending all content back to your client but only updating the update panel. jQuery will be far more efficient. (and the reason I use it!!)
Update
If you don't believe me, see... Why Update Panels are dangerous
Update #2
If you don't want to go the whole way of learning Ajax just yet (although I'd recommend it) you could always pre-load your page with all the possible drop down combinations and then swap them using javascript / javascript + jQuery.
Here is one example of how you may do it -- use jQuery for dependent drop down combos
Using this method you are more likely to be able to save the code you've already written to work out the drop down options.

thoughts on asp.net grid controls

All, I am creating a web application and I need to give users the ability to add/edit/delete records in a grid type control. I can't use 3rd party controls so I am restricted to just whats in the box for asp.net (datagrid or gridview) or creating my own. Any thoughts on the best direction to go in. I'd like to keep the complexity level at a dull roar :)
thanks in advance
daniel
You should definitely use edit and insert templates. All you have to do is give the button/link the command name such as insert/delete/update and you can allow the Grid to do most of all the work.
Check out this link
I think you'll learn to love the gridviews because they are pretty powerful.
Gridviews have different item templates that you can use for editing and inserting data. That'd be an easy way to go about it.
As long as you set your datakeyid property to the primary key in the database, you should be able to make template fields based off of whether or not you're editing or inserting data. The command name of the button you use to fire the event will handle the statements required for updating/inserting data.
This is a good site for some examples.
the out of the box grid is not too bad.
Here are a few links on master detail records in asp.net this should get you started on the CRUD opperations.
http://www.exforsys.com/tutorials/asp.net-2.0/displaying-master-detail-data-on-the-same-page.html http://msdn.microsoft.com/en-us/library/aa581796.aspx
http://www.bing.com/search?q=asp.net+master+detail
this is the best site for what you are after
www.Asp.Net
Data Access Tutorials controls
Master/Detail Using a Selectable
Master GridView with a Details
DetailView
Using TemplateFields in the GridView
Control
Others
Beginners Guide to the GridView
Control
The GridView Control
IN-DEPTH LOOK AT THE GRIDVIEW CONTROL

Resources