Solved

Listview design with itemTemplate and Layout

Posted on 2010-11-17
5
593 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

697 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