


































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 42
This page cannot be seen from the preview
Don't miss anything!



































Detailed discussion of using the GridView
Columns can be set using the wizard (see following screen shot) Columns can be managed using the .aspx code Or programmatically
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
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
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
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
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
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
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 )
Custom paging is supported along with custom pager styles AllowCustomPaging – defines a custom pager
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
Each GridView is made up of a set of Columns The