• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
ASP.NET
 
2.0
 
GridView
 
Control
 
Page
 
|
 
1
 
ASP.NET
 
2.0
 
GridView
 
Control
 
Description ....................................................................................................................................................................2
 
Step
 
by
 
step
 
 –
 
Create
 
a
 
GridView
 
Control
 
to
 
display
 
data.............................................................................................3
 
GridView
 
Control
 
Fields.............................................................................................................................................5
 
Step
 
by
 
step
 
 –
 
Create
 
a
 
GridView
 
Control
 
with
 
editing
 
enabled.................................................................................12
 
Databinding
 
the
 
GridView
 
Control
 
to
 
a
 
Datasource....................................................................................................17
 
Postbacks.....................................................................................................................................................................18
 
GridView
 
Control
 
Events
 
&
 
Database
 
Operations.......................................................................................................18
 
Event
RowEditing...................................................................................................................................................18
 
Event
RowCancelingEdit........................................................................................................................................19
 
Event
RowUpdating...............................................................................................................................................19
 
Event
RowDeleting................................................................................................................................................20
 
Event
 
 –
 
RowCommand ............................................................................................................................................21
 
GridView
 
Control
 
Quick
 
Start ......................................................................................................................................22
 
 
ASP.NET
 
2.0
 
GridView
 
Control
 
Page
 
|
 
2
 
Description
 
See
 
msdn.com
 
for
 
more
 
info:
 
http://msdn2.microsoft.com/en
us/library/system.web.ui.webcontrols.gridview(VS.80).aspx
 
The
 
GridView
 
Control
 
belongs
 
to
 
the
 
System.Web.UI.WebControls
 
Namespace.
 
The
 
GridView
 
Control
 
is
 
a
 
repeating
 
control
 
which
 
renders
 
out
 
data
 
in
 
horizontal
 
adjacent
 
columns
 
and
 
displays
 
the
 
values
 
of 
 
a
 
DataSource
 
where
 
each
 
column
 
represents
 
a
 
field
 
and
 
each
 
row
 
represents
 
a
 
record.
 
The
 
example
 
below
 
shows
 
a
 
GridView
 
Control
 
bound
 
to
 
three
 
fields,
 
includes
 
HeaderText
 
and
 
has
 
been
 
formatted
 
using
 
CSS.
 
 
GridView
 
Control
 
Above:
 
Runtime
 
view
 
of 
 
the
 
rendered
 
GridView
 
Control
 
The
 
GridView
 
Control
 
also
 
allows
 
you
 
to
 
select,
 
sort,
 
and
 
edit
 
records
 
via
 
GridView
 
Control
 
events.
 
Locate
 
the
 
events
 
belonging
 
to
 
the
 
GridView
 
Control
 
by
 
switching
 
to
 
code
 
view
 
and
 
then
 
selecting
 
the
 
name
 
of 
 
your
 
GridView
 
Control
 
from
 
the
 
Class
 
Name
 
drop
 
down
 
list
 
(left).
 
Then
 
click
 
the
 
arrow
 
on
 
the
 
Method
 
Name
 
drop
 
down
 
list
 
(right).
 
GridView
 
Control
 
events
 
 
ASP.NET
 
2.0
 
GridView
 
Control
 
Page
 
|
 
3
 
Above:
 
GridView
 
Control
 
events
 
Method
 
Name
 
list.
 
Above:
 
Larger
 
view
 
of 
 
GridView
 
Control
 
events
 
as
 
seen
 
in
 
the
 
GridView
 
Control
 
Method
 
Name
 
list.
 
Step
 
by
 
step
 
 –
 
Create
 
a
 
GridView
 
Control
 
to
 
display
 
data
 
1.
 
Locate
 
a
 
GridView
 
Control
 
in
 
the
 
Data
 
section
 
of 
 
the
 
Visual
 
Studio
 
Toolbox
.
 
Place
 
onto
 
the
 
desired
 
area
 
of 
 
your
 
Web
 
Form.
 
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...