Qaiser Mehmood

Qaiser Mehmood

  • NA
  • 105
  • 0

Regarding grid view columns and rows

Oct 13 2008 1:46 AM

 

 

Hello Every One.

I have following  code it shows the images in one column with  multiple rows but i want to convert one culmns into multiple columns  how?

Thnaks to who solve this.

 

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Fleet.aspx.cs" Inherits="Fleet" Title="Untitled Page"%>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

This

ur Fleet<br />

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"

DataSourceID="AccessDataSource1" AllowPaging="True" DataKeyNames="Car_id">

<Columns>

<asp:TemplateField HeaderText="link">

<ItemTemplate>

<table>

<a href="test.aspx?Car_id=<%#Eval("Car_id")%>">

<IMG height=100 src='images/<%#Eval("Car_picture")%>' width=100 border=0 title="Cyprus" /><asp:Label ID="Label1" runat="server"> Detail of Car<%#Eval("Car_id")%> </asp:Label></a>

<tr><td><b>Good Car</b></td></tr>

</table>

</ItemTemplate>

</asp:TemplateField>

</Columns>

</asp:GridView>

<asp:AccessDataSource ID="AccessDataSource1" runat="server"

DataFile="~/DataBase/Autostop.mdb"

SelectCommand="SELECT [Car_picture], [Car_id] FROM [Rates]">

</asp:AccessDataSource>

<br />

</asp:Content>


Answers (1)