0

I don't really know how to explain this.. or what to try out.

Since I don't know how to name it, it's also very hard for me to google for a solution but here is what I want.

In MVC I send a list of items from code behind. What I wish is to have these items shows in a dynamic grid.

So, based on the width the users screen I want the items to show next to eachother, and when one would go outsided of the line of sight it should go to the next column.

Giving me the following result:

Item1    Item2    Item3    Item4    Item5
Item6    Item7    Item8    Item9    Item10
Item11   Item12   Item13   Item14   Item15
Item16   Item17   Item18   Item19   Item20

or if someone has a smaller screen:

Item1    Item2   Item3    Item4
Item5    Item6   Item7    Item8
Item9    Item10  Item11   Item12
Item13   Item14  Item15   Item16
Item17   Item18  Item19   Item20

Is this possible?

I'm using MVC 4.0 with asp.net and C# as code behind.

1
  • did u use datalist ?? Commented Feb 20, 2014 at 14:56

1 Answer 1

1

I think the main point of your question is finding a way to display data differently depending on the user's screen resolution. In that case, it has nothing to do with C# or MVC, it's all about the html way you render it. I would suggest to have a look at twitter bootstrap grid system

Sign up to request clarification or add additional context in comments.

2 Comments

Good example using bootstrap. We are using that a lot in our website and it helps. But as I see it, it still requires me to have a static amount of items to be shown next to eachother. It there a way to make this dynamic, as shown in my example above?
After some playing around I found out that this is exactly what I wanted, thanks !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.