Solved

Listview design with itemTemplate and Layout

Posted on 2010-11-17
5
590 Views
Last Modified: 2012-05-10
Id like the Listview look like this:
   control                          field                  Field           control
checkbox            SchoolID          SchoolName          Button


How will I design this?
0
Comment
Question by:zachvaldez
  • 2
  • 2
5 Comments
 
LVL 13

Assisted Solution

by:AngryBinary
AngryBinary earned 75 total points
ID: 34158915
I would design that as a GridView, since what you're looking at is basically a table of data with some context controls:

<asp:GridView id="GridView1" runat="server" autogeneratecolumns="false">
<Columns>
<asp:TemplateField><ItemTemplate><asp:CheckBox id="CheckBox1" runat="server" /></ItemTemplate></asp:TemplateField>
<asp:BoundField datafield="SchoolID" />
<asp:BoundField datafield="SchoolName" />
<asp:TemplateField><ItemTemplate><asp:Button id="Button1" runat="server" Text="Button" /></ItemTemplate></asp:TemplateField>
</Columns>
</asp:GridView>
0
 

Author Comment

by:zachvaldez
ID: 34159065
All my designs are in gridview. I d like this ot be in listview if possible.
0
 
LVL 7

Accepted Solution

by:
mr_nadger earned 175 total points
ID: 34173148
closing because two days isn't quick enough?

This is fairly simple to do, use CSS to create a columnar layout and apply it to the itemtemplate of the listview.

.left3col

{

	width: 33%;  

    text-align: left;

    font-size:medium ;

	position: absolute;

	background-color:white;

}

.mid3col

{

    Left:34%;

    width: 33%;  

    text-align: left;

    font-size:medium ;

	position: absolute;

	background-color:white;

}

.right3col

{

    Left:67%;

    width: 33%;  

    text-align: left;

    font-size:medium ;

	position: absolute;

	background-color:white;

}

Open in new window

0
 
LVL 7

Expert Comment

by:mr_nadger
ID: 34173161
granted the css only has three columns, but it's easily adapted to add a fourth, the only caveat is keeping the widths consistent
0
 

Author Comment

by:zachvaldez
ID: 34174805
thnaks! it can be done using listview and itmtemplate the ideas are appreciated. I'll keep the css code for future use.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
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…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now