Click here to Skip to main content
15,942,710 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a gridview and a image column in database i want to display that images in this gridview.
i want to display images in column wise, means first image in first column and second is in second column
and third is third column, and four image in second row and in second row display only three image.
again in next row display three image and so...on.
i want to do this in asp.net(C#). how is that possible to do this.

please help.

thanks in advance.
Posted

1 solution

You need to understand how GridView works. When you say three columns, then you have to define these Columns in GridView.

So, important thing is while getting the data, you have to organize in a DataTable or any other DataSource in the structure you need. Organize 3 images in a row in the query and bind that to the Grid, it will eventually reflect.

But, before all these, just ask yourself, why you need this? If you are trying to build a Slider or image Slide Show, then there are many other controls for that. You can also use many jQuery Sliders for that. I have written one Blog on that.

Check - ASP.NET Repeater with jQuery Slider[^].
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900