Using the DetailsView and FormView Controls. Slide 2 DetailsView (Introduction) Use the DetailsView control to Display a single record at a time Insert,

Slides:



Advertisements
Similar presentations
MS Word (Insert Header) Outline: Open MS Word Select Insert Tab Select Header Tool Customize Header as Needed (Title, Page Number, Etc.) MLA Style Formatting.
Advertisements

GridView Features, DetailsView, FormView. Content GridView Features DetailsView FormView Muzaffer DOĞAN - Anadolu University2.
Pasewark & Pasewark 1 Word Lesson 7 Working with Documents Microsoft Office 2007: Introductory.
® Microsoft Office 2010 Word Tutorial 3 Creating a Multiple-Page Report.
Header and footer basics Add page numbers, date, and more Think of page formatting in a book. The book title is at the top of one page, the chapter title.
Word Lesson 7 Working with Documents
User Controls, Master Pages, GridView. Content User Controls Styles, Themes, Master Pages Working with Data GridView Muzaffer DOĞAN - Anadolu University2.
Lesson 16 Enhancing Documents
Chapter 9 Customizing Data with Web Controls. ASP.NET 2.0, Third Edition2.
Access Lesson 2 Creating a Database
Creating Bindable Grids of Data. Slide 2 Lecture Overview Detailed discussion of using the GridView.
ASP.NET Data Binding. Slide 2 Lecture Overview Understanding the ASP.NET data binding model.
® Microsoft Office 2010 Word Tutorial 3 Creating a Multiple-Page Report.
Building ASP.NET Applications 2 Lecture 3,4 T. Ahlam Algharasi 4 th Level.
ACCESS – CHAPTER 4 ZNANATEJ PANGA October 27, 2014.
Pasewark & Pasewark 1 Access Lesson 4 Creating and Modifying Forms Microsoft Office 2007: Introductory.
Access 2007 ® Use Databases How can Microsoft Access 2007 help you to enter and organize information?
Create Professional-looking Content Easy to Use Interface Share Documents.
Chapter 8 Binding Data to Web Controls. ASP.NET 2.0, Third Edition2.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 4: Create, Edit, and Perform.
Chapter 10 Managing Data with ASP.NET. ASP.NET 2.0, Third Edition2.
Unit 8.2 Learning Objectives How data can be used – The Money Ball Example The Money Ball Example Data Warehouses – The Role of Data Warehouses The Role.
CPSC 203 Introduction to Computers T59 & T64 By Jie (Jeff) Gao.
MSIS 5133 Advanced MIS - E-Commerce Spring 2003 Lecture 4: DotNet Technologies - Part 4 Using Controls with Databases Dr. Rathindra Sarathy.
Chapter 81 Building Data-Driven Web Applications Introduction to ASP.NET By Kathleen Kalata.
Chapter 71 Building Data-Driven ASP.NET Applications Introduction to ASP.NET By Kathleen Kalata.
IT533 Lectures DataBinding Controls. Installations Microsoft® SQL Server® 2008 Express Download the sample MDF files from the course’s web site CodeWeek3.zip.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
McGraw-Hill Career Education© 2008 by the McGraw-Hill Companies, Inc. All Rights Reserved. 2-1 Office PowerPoint 2007 Lab 2 Modifying and Refining a Presentation.
1 Lesson 18 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Unit 8.3 Learning Objectives Insert users into the ASP.NET Membership system from code Capture data being sent to the database Capture Exceptions that.
Chapter 4: Create, Edit, and Perform Calculations in Reports Exploring Microsoft Office Access 2007.
Delivering Excellence in Software Engineering ® EPAM Systems. All rights reserved. Data Binding in ASP.NET.
1 Word Lesson 3 Formatting Documents Microsoft Office 2010 Fundamentals Story / Walls.
Database Systems Microsoft Access Practical #2 Making Forms and Reports Nos 215.
IS201 Agenda: 10/15/2013 Do form and report exercise. Identify general guidelines for form and report design. Discuss a few key points about reports in.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
CIS—100 Chapter 7—Headers and Footers 1. Chapter Objectives 2 After successful completion this chapter you should be able to:  Add page numbers.  Add.
Chapter 8 Working With Databases in ASP.NET. Listing 8.1 – ShowListControls Uses The SqlDataSource control for estabishing database connectivity and.
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 3 – Creating and Modifying Forms.
ADO.NET Part 2. Slide 2 Overview Slide 3 Introduction to the DataGridView Control It’s a two-dimensional grid containing rows and columns Its use in.
Formatting Tables with Styles To format a table: – Click in the table and then click the Table Tools Design tab – In the Table Styles group, click the.
Data-Driven - 1 © Minder Chen, Building Data-Driven Web Sites in ASP.NET 2.0.
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 3 – Creating and Modifying Forms.
TRAINING SESSIONS.NET Controls.  Standard Controls  Label  Textbox  Checkbox  Button, Image Button, Image control  Radio Button  Literal  Hyperlink.
Reference: “ASP.NET 2.0 Illustrated” by Alex Homer and Dave Sussman. -ch3 illustrated book
1 Lesson 13 Organizing and Enhancing Worksheets Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 4: Create, Edit,
Working with Themes, Quick Parts, Page Backgrounds, and Headers and Footers Lesson 7.
ASP Chapter 8 1. Active Server Pages Server-side technology dynamicinteractivedata-driven Enables dynamic, interactive, data-driven web pages languages.
Security Attacks CS 795. Buffer Overflow Problem Buffer overflow Analysis of Buffer Overflow Attacks.
CPSC 203 Introduction to Computers T97 By Jie (Jeff) Gao.
Excel part 5 Working with Excel Tables, PivotTables, and PivotCharts.
ASP.NET Data Binding. Slide 2 Lecture Overview Understanding the ASP.NET data binding model.
1 CS 3870/CS 5870: Note07 Prog 4. Master Pages Creating a master page based on another master page MainMasterPage –For all Progs and Tests Prog4MasterPage.
1 CS 3870/CS 5870: Note07 Prog 4. Master Pages Creating a master page based on another master page MainMasterPage –For all Progs and Tests Prog4MasterPage.
Unit 8.2 Learning Objectives Data Warehouses – The Role of Data Warehouses The Role of Data Warehouses – Group Exercise Accessing Data in Views – Accessing.
Module 10: Data Access in ASP.NET. Overview Overview of the ASP.NET Data Access What is Data Access List of Data Source Control What is Data Bound How.
Pasewark & Pasewark 1 Word Lesson 7 Working with Documents Microsoft Office 2007: Introductory.
June 17, 2009 Office 2007 Tips & Tricks.
Unit 8.1: Introducing Databases
Forms.
Unit 8.2 How data can be used Accessing Data in Views
Listing 9.1 ShowLocalConnection.aspx
Creating Bindable Grids of Data
FormTrap Design Tutorial
© 2016, Mike Murach & Associates, Inc.
Environment/Report Tutorial
PROG Advanced Web Apps 2/24/2019 Session 9.2 Data Binding Wendi Jollymore, ACES.
Instructions BASIC POWERPOINT TEMPLATE FOOTERS
Presentation transcript:

Using the DetailsView and FormView Controls

Slide 2 DetailsView (Introduction) Use the DetailsView control to Display a single record at a time Insert, edit, and delete records

Slide 3 DetailsView Characteristics (1) It’s really a single record version of the GridView control Paging works the same way Data binding works the same way The event model is nearly identical ItemInserting and ItemInserted appear because you can add rows ItemCreated fires each time a row is created

Slide 4 DetailsView Characteristics (2) Basically, the element replaces the element Styles work similarly AlternatingRowStyle, CommandRowStyle, EditRowStyle, InsertRowStyle, etc…

Slide 5 DetailsView (Example) Just by binding the DetailsView to a DataSource, you get basic selection and editing capabilities See DetailsViewExample1

Slide 6 DetailsView (Configuring 1) You can use the Smart Editor to do much of the boiler plate configuration

Slide 7 DetailsView (Configuring 2)

Slide 8 DetailsView (Fields Introduction) If the AutoGenerateFields property is true, the fields will be created automatically If not, you need to create each field manually

Slide 9 DetailsView (Code Example) <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowInsertButton="True" /> <asp:BoundField DataField="fldCASIndexNumber" HeaderText="CAS" ReadOnly="True“ SortExpression="fldCASIndexNumber" /> <asp:BoundField DataField="fldChemicalName" HeaderText="Chemical" SortExpression="fldChemicalName" /> <asp:BoundField DataField="fldCASRegNo" HeaderText="CAS Number" SortExpression="fldCASRegNo" /> <asp:CheckBoxField DataField="fldCarcinogenic" HeaderText="fldCarcinogenic" SortExpression="fldCarcinogenic" />

Slide 10 DetailsView (Fields 1) Take a look at the Field Editor (fields have different types) The following are used to create visible controls to display bound data (Set the DataField property BoundField CheckBoxField HyperLinkField ImageField ButtonField TemplateField

Slide 11 DetailsView (Fields 2) Use the CommandField to display automatically wired buttons ShowDeleteButton ShowInsertButton ShowEditButton Example: <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowInsertButton="True" />

Slide 12 DetailsView (Working with the Current Row) Each row has a data type of DetailsViewRow The RowType property contains an enumeration depicting the type of row ( DataRow, Header, Footer, etc… Example if (row.RowType == DataControlRowType.Header) { // Do something. }

Slide 13 DetailsView (Updating Records) Like the GridView The DataKeyNames property must define a record key The data source must be set up for updates Create CommandFields for the Insert, Update, and Delete buttons See DetailsViewExample2.aspx

Slide 14 DetailsView (Templated Fields) You have two choices for field layout Use what the DetailsView provides Create a Template field and define the following three templates

Slide 15 The FormView Control (Introduction) The control operates similar to the DetailsView However, instead of having to create custom templates for everything, there are a predefined set of templates to work with In fact, all records are based on templates The tools and designers help you create these Use Eval and Bind to bind the data

Slide 16 The FormView Control (Templates 1) ItemTemplate appears while a record is NOT being edited or deleted InsertItemTemplate appears while a record is being inserted EditItemTemplate appears while a record is being header EmptyDataTemplate appears when there are no records

Slide 17 The FormView Control (Templates 2) HeaderTemplate is the header row at the top It can contain any html or ASP controls. FooterTemplate is the footer row at the bottom The same is true here

Slide 18 The FormView Control (Templates 3) PagerTemplate appears in the pager row The The FormView Control (Templates 2) stores the ‘magical’ pager arguments Next, Prev, First, Last Formview.PageCount contains the number of pages Formview.PageIndex contains the number of the current page Handle PageIndexChanged when the page number changes ( CommandArgument must be set to page )

Slide 19 Template Contents For each template, you define the bound controls that will display the data, along with the formatting The most common practice is to use tables