有关GridView与SqlDataSource控件----动态程序篇
GridView控件的方法:
DeleteRow
Focus
Sort
UpdateRow
GridView控件事件:
DataBinding
DataBound
PageIndexChanged
PageIndexChanging
RowCancelingEdit
RowCommand
RowCreated
RowDataBound
RowDeleted
RowDeleting
RowEditing
RowUpdated
RowUpdating
SelectedIndexChanged
SelectedIndexChanging
Sorted
Sorting
GridView的CodeBehind撰写模式:
方式一、事先创建GridView及SqlDataSource控件
方式二、仅事先创建SqlDataSource控件
方式三、事先完全不创建任何控件
GridViewRow 的RowType与RowState 属性
GridViewRow所代表的就是GridView中的数据行(Row),它会被实体化成一个对象,它有两个重要属性:(1)RowType,(2)RowState
GridViewRow的RowType类型:用以判断目前的Row是属于何种类型,访问方式通过DataControlRowType列举来进行的
GridViewRow的RowState状态:可说明GridViewRow目前处于何种状态,访问方式通过DataControlRowState列举来进行的
要取得GridViewRow的数据行索引值可以用RowIndex属性取得
浙公网安备 33010602011771号