Swag
Swag

Reputation: 2140

C# GridView Design

At the moment I am programming a Social Media website in aspx.net.

I am using a MySQL (phpmyadmin) Database where I store my data, en read my data from.

For example:

When a user posts something on his wall, the posted text will be saved in the database, and the post will be shown at the profile page with reading it from the database.

To show the posts I am using a GridView.

This is an example how it looks like at the moment (Gridview-style):

http://www.y451n.nl/publicuploads/tikprofiel.png

After doing some research I still can't find how to design a GridView. I would like to have something like this:

http://www.y451n.nl/publicuploads/gridviewdesign.png http://www.y451n.nl/publicuploads/gridviewdesign.png

I appreciate your help guys!

Thanks in advance.

Upvotes: 2

Views: 1942

Answers (1)

Pleun
Pleun

Reputation: 8920

Well, your design will be hard to achieve with the (limited) gridview. I recommend you to use the extra flexibility of a repeater.

http://msdn.microsoft.com/nl-nl/library/system.web.ui.webcontrols.repeater(v=vs.110).aspx

It has the same databinding principles, but you can use ItemTemplates that give you much more control over your HTML.

Or, if you have just started, switch to the MVC pattern for optimum flexibility.

Upvotes: 2

Related Questions