Solved

how flexible can asp.net DataGrid get?

Posted on 2008-06-21
11
237 Views
Last Modified: 2013-11-26
I wanted to know whether I could achieve a structure identical to the attached image using ASP.NET DataGrid (or any other control in  ASP.NET). The most important point is that I fill the below structure with data from a database. do you think it's possible?

btw, the first 2 columns can be created easily. but what I'm really concerned with is the beneath slot (where the number goes)

I'd appreicate your help
MenuScreenShot.bmp
0
Comment
Question by:ChefMaha
  • 5
  • 4
  • 2
11 Comments
 
LVL 6

Expert Comment

by:kennethfine
ID: 21839776
Hi ChefMaha,

The new ASP.NET 3.5 ListView control is exactly what you want, along with (maybe) the new DataPager control. This tutorial will tell you everything you need to know:
http://aspnet.4guysfromrolla.com/articles/010208-1.aspx
0
 
LVL 6

Expert Comment

by:kennethfine
ID: 21839779
Also, see here for some examples of how flexibly the ListView control can be used:
http://blogs.msdn.com/mikeormond/archive/2008/01/23/some-asp-net-3-5-listview-control-examples.aspx

The ListView is a great addition to ASP.NET, especially coupled with the DataPager. The GridView is complex and "mysterious" if you try to customize it. The Repeater isn't featured enough. ListView hits the sweet spot. Try it, you'll like it. ;)
0
 
LVL 11

Accepted Solution

by:
Anurag Agarwal earned 200 total points
ID: 21840341
As you have posted your question in Zone VS 2003 so i beleive you are working in .net 1.1

I think you can use the Data Repeater control.. It will give you the flexibility of showing data in one line either horiz or vertically

Anurag
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 6

Expert Comment

by:kennethfine
ID: 21840473
If you intend to ever have any kind of "paging" on those menus -- i.e. "show next 10 delicious food items" -- an ASP.NET ListView + DataPager is the way to go. It will save you a lot of development pain. If you don't or you're compelled to work under ASP.NET 1.1 a repeater or a DataLIst can be made to work.

If you aren't using ASP.NET 2.0 with the 3.5 extensions, I would recommend it. Visual Studio (Express) 2005 and above are much better environments for web development than the older versions of VS.NET.
0
 

Author Comment

by:ChefMaha
ID: 21841456
thanks for your help.

I am working on VS 2003 but to follow your advice,  I'm downloading VS express 2005

now let's start with Data Repeater control anuragal, I remember seeing it somewhere. But, I can't find it in the control list. Where can I find it and use it?

thanks again
0
 
LVL 6

Expert Comment

by:kennethfine
ID: 21843059
Download VS Express 2008 and use the DataList.

If you want to use the other control, it's just called the "Repeater." It should be in the toolbox once you start an ASP.NET page.

0
 
LVL 6

Assisted Solution

by:kennethfine
kennethfine earned 50 total points
ID: 21843061
Excuse me, I meant to say, "Download VS Express 2008 and use the ListView."
0
 

Author Comment

by:ChefMaha
ID: 21843542
ok thanks for your help

I'll get back to you once I get things running
0
 

Author Comment

by:ChefMaha
ID: 21871900
hi. just to keep you updated, I wanna tell you that I tried to download VS Express2005, but it was terribly slow cuz my net connection is pretty slow.

therefore, I will probably go for the repeater control with 2003
0
 

Author Comment

by:ChefMaha
ID: 21871946
I think I'll use the ASP.NET DataList

what do you think?
0
 
LVL 11

Assisted Solution

by:Anurag Agarwal
Anurag Agarwal earned 200 total points
ID: 21872211
Hey

you can use DataList, i guess it will do the task for you. Here is a good article for how to use Datalist control.

https://secure.codeproject.com/KB/books/master_aspnet.aspx

Anurag
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question