• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 603
  • Last Modified:

Listview design with itemTemplate and Layout

Id like the Listview look like this:
   control                          field                  Field           control
checkbox            SchoolID          SchoolName          Button


How will I design this?
0
zachvaldez
Asked:
zachvaldez
  • 2
  • 2
2 Solutions
 
AngryBinaryCommented:
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
 
zachvaldezAuthor Commented:
All my designs are in gridview. I d like this ot be in listview if possible.
0
 
mr_nadgerCommented:
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
 
mr_nadgerCommented:
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
 
zachvaldezAuthor Commented:
thnaks! it can be done using listview and itmtemplate the ideas are appreciated. I'll keep the css code for future use.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now