[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Listview design with itemTemplate and Layout

Posted on 2010-11-17
5
Medium Priority
?
599 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 300 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 700 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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This video teaches users how to migrate an existing Wordpress website to a new domain.
Suggested Courses
Course of the Month18 days, 21 hours left to enroll

834 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