data listing web controls macdonald ch. 13-14 mis 324 mis 324 professor sandvig professor sandvig

9
Data Listing Web Data Listing Web Controls Controls MacDonald Ch. 13-14 MacDonald Ch. 13-14 MIS 324 Professor Sandvig

Upload: sheena-snow

Post on 17-Jan-2018

221 views

Category:

Documents


0 download

DESCRIPTION

Web Controls Overview Classes all located in system.web.ui.webcontrols namespace Classes all located in system.web.ui.webcontrols namespace DocumentationDocumentationDocumentation Too many controls to cover Too many controls to cover New controls added each versionNew controls added each version Focus on essential controls & concepts Focus on essential controls & concepts

TRANSCRIPT

Page 1: Data Listing Web Controls MacDonald Ch. 13-14 MIS 324 MIS 324 Professor Sandvig Professor Sandvig

Data Listing Web ControlsData Listing Web ControlsMacDonald Ch. 13-14MacDonald Ch. 13-14

MIS 324Professor Sandvig

Page 2: Data Listing Web Controls MacDonald Ch. 13-14 MIS 324 MIS 324 Professor Sandvig Professor Sandvig

OutlineOutline Web Controls OverviewWeb Controls Overview TabularTabular

• RepeaterRepeater• DataListDataList• GridViewGridView

Single RecordSingle Record• FormViewFormView• DetailsViewDetailsView

Page 3: Data Listing Web Controls MacDonald Ch. 13-14 MIS 324 MIS 324 Professor Sandvig Professor Sandvig

Web Controls OverviewWeb Controls Overview Classes all located in Classes all located in

system.web.ui.webcontrols system.web.ui.webcontrols namespacenamespace• Documentation

Too many controls to coverToo many controls to cover• New controls added each versionNew controls added each version

Focus on essential controls & Focus on essential controls & conceptsconcepts

Page 4: Data Listing Web Controls MacDonald Ch. 13-14 MIS 324 MIS 324 Professor Sandvig Professor Sandvig

Web Controls OverviewWeb Controls Overview Simple ControlsSimple Controls

• Display single itemsDisplay single items• Correspond to HTML tagsCorrespond to HTML tags• textbox, radiobutton, checkbox, button…textbox, radiobutton, checkbox, button…

List ControlsList Controls• Name/Value pairsName/Value pairs• RadioButtonList, CheckBoxList, Dropdown ListRadioButtonList, CheckBoxList, Dropdown List

Page 5: Data Listing Web Controls MacDonald Ch. 13-14 MIS 324 MIS 324 Professor Sandvig Professor Sandvig

Web Control OverviewWeb Control Overview Tabular ControlsTabular Controls

• Display > 1 columnDisplay > 1 column• DataList, GridView, RepeaterDataList, GridView, Repeater

Single Record ControlsSingle Record Controls• FormViewFormView

TemplatesTemplates• Use to describe data formatUse to describe data format

Page 6: Data Listing Web Controls MacDonald Ch. 13-14 MIS 324 MIS 324 Professor Sandvig Professor Sandvig

Tabular ControlsTabular ControlsDisplay multiple columns of dataDisplay multiple columns of data

• GridViewGridView Display data in table formatDisplay data in table format Most features – editing, paging, sortingMost features – editing, paging, sorting Constraint: one data item per cellConstraint: one data item per cell

• DataListDataList No default format – must use templatesNo default format – must use templates Very flexible formatting Very flexible formatting Editing featuresEditing features

• RepeaterRepeater Read only, most efficient for data displayRead only, most efficient for data display No default format – must use templatesNo default format – must use templates

Page 7: Data Listing Web Controls MacDonald Ch. 13-14 MIS 324 MIS 324 Professor Sandvig Professor Sandvig

Tabular ControlsTabular Controls Consist of rows and fieldsConsist of rows and fields Fields may contain other controlsFields may contain other controls

• ButtonsButtons• HyperlinksHyperlinks• TextboxesTextboxes• DropDownListsDropDownLists• Other tabular controlsOther tabular controls

Need to access control propertiesNeed to access control properties• ““FindControl” methodFindControl” method

Handle control eventsHandle control events• Events “bubble up” to parent controlEvents “bubble up” to parent control

Page 8: Data Listing Web Controls MacDonald Ch. 13-14 MIS 324 MIS 324 Professor Sandvig Professor Sandvig

Tabular ControlsTabular Controls DataList ControlDataList Control

• Very flexible formatVery flexible format Template requiredTemplate required

• Supports editingSupports editing• Repeat columns propertyRepeat columns property

• Example: DataListing (source)Example: DataListing (source)• Web.config sourceWeb.config source

Page 9: Data Listing Web Controls MacDonald Ch. 13-14 MIS 324 MIS 324 Professor Sandvig Professor Sandvig

SummarySummary Data AccessData Access

1.1.ProgrammaticProgrammatic Connection & command objectsConnection & command objects

2.2.DeclarativeDeclarative Drag & drop via VSDrag & drop via VS

Data listing server controlsData listing server controls• List controlsList controls• Tabular ControlsTabular Controls

Next: two-way databinding Next: two-way databinding