Data Grids - Internet Programming - Lecture Slides, Slides of Computer Programming

In the world of internet, web programming is evolving and increasing its importance exponentially. This lecture key points are: Data Grids, Creating Bindable, Setting Column Properties, Datagrid and Gridview, Complementary Gridview, Binding, Columns, Sorting Columns, Captions

Typology: Slides

2012/2013

Uploaded on 09/27/2013

vikrant
vikrant 🇮🇳

4.4

(9)

119 documents

1 / 42

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Creating Bindable Grids
of Data
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a

Partial preview of the text

Download Data Grids - Internet Programming - Lecture Slides and more Slides Computer Programming in PDF only on Docsity!

Creating Bindable Grids

of Data

Lecture Overview

 Detailed discussion of using the GridView

Setting Column Properties

(Introduction)

 Columns can be set using the wizard (see following screen shot)  Columns can be managed using the .aspx code  Or programmatically

Setting Column Properties

(Illustration)

Complementary GridView

Controls

ListView uses templates to display data  Insert, update, delete supported  DetailsView displays a single row from a data source  Insert, update delete supported  More in the next lecture

GridView (Binding)

DataSource and DataMember control define the control’s source of data  Or use the DataSourceID  The value of DataSourceID should be an AccessDataSource or other SqlDataSource

GridView (Sorting Columns)

 Simply put, you set the AllowSorting property to true  The underlying data source handles the sorting  The column header appears as a link button  Set the SortDirection property to Ascending or Descending  For each bound field, set the sortexpression attribute to the field or expression that will be evaluated

GridView (Captions)

Caption – appears above the grid headers  CaptionAlign – controls the alignment of the caption  Captions can appear along the left, top, right, or bottom of the grid  ShowHeader and ShowFooter – display the header or footer  Note the caption appears in the header

GridView (Paging 1)

 Paging provides the facility that enables the DataSet to be displayed in pages having a fixed length  This keeps the Web page from getting too long  Reduces page size thereby improving download times

GridView (Paging)

AllowPaging (false) – controls whether data appears on multiple pages  PageSize - defines the number of items (rows) per page  The above are both members of the grid itself

PageIndex – gets the current page being displayed  PageCount – gets the number of pages available

GridView

( PagerSettings )

 The PagerSettings object allows you to use predefined display modes  Modes ( NextPrevious , NextPreviousFirstLast , Numeric , NumericFirstLast )  Non-numeric button customization ( FirstPageText , PreviousPageText , NextPageText , LastPageText  Or Images ( FirstPageImageURL , PreviousPageImageURL , NextPageImageURL , LastPageImageURL )

GridView (Custom Paging)

 Custom paging is supported along with custom pager styles  AllowCustomPaging – defines a custom pager

GridView (Row Styles 1)

 The following set the style of various graphical elements  RowStyle – individual items displayed in all rows  AlternatingRowStyle – every other item  EditRowStyle – the item being edited  FooterStyle – the footer appearing at the bottom of the control  HeaderStyle – the header appearing at the top of the control  SelectedRowStyle – the selected row  PagerStyle – the style of the pager area

GridView (Columns)

 Each GridView is made up of a set of Columns  The collection is a child of the GridView  Each column is considered a “field”. A column can display  bound data  predefined commands (buttons)  Hyperlinks and images  Custom templates