会员
周边
众包
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
探知,不断发现
探知不断发现
博客园
首页
博问
闪存
新随笔
订阅
管理
Radgrid EditFormType="AutoGenerated" 如何获得值
<
radG:RadGrid
ID
="radGridBaseTag"
EnableAJAX
="true"
runat
="server"
AllowPaging
="True"
EnableAJAXLoadingTemplate
="True"
LoadingTemplateTransparency
="15"
OnNeedDataSource
="radGridBaseTag_NeedDataSource"
OnDeleteCommand
="radGridBaseTag_DeleteCommand"
OnInsertCommand
="radGridBaseTag_InsertCommand"
OnUpdateCommand
="radGridBaseTag_UpdateCommand"
>
<
MasterTableView
AutoGenerateColumns
="False"
CommandItemDisplay
="Top"
DataKeyNames
="ID"
>
<
Columns
>
<
radG:GridBoundColumn
DataField
="ID"
HeaderText
="ID"
UniqueName
="ID"
ReadOnly
="true"
>
</
radG:GridBoundColumn
>
<
radG:GridBoundColumn
DataField
="Name"
HeaderText
="Name"
UniqueName
="Name"
>
</
radG:GridBoundColumn
>
<
radG:GridEditCommandColumn
></
radG:GridEditCommandColumn
>
<
radG:GridButtonColumn
ConfirmText
="Are you sure?"
CommandName
="delete"
Text
="delete"
></
radG:GridButtonColumn
>
</
Columns
>
<
ExpandCollapseColumn
Visible
="False"
>
<
HeaderStyle
Width
="19px"
></
HeaderStyle
>
</
ExpandCollapseColumn
>
<
RowIndicatorColumn
Visible
="False"
>
<
HeaderStyle
Width
="20px"
></
HeaderStyle
>
</
RowIndicatorColumn
>
<
EditFormSettings
EditFormType
="AutoGenerated"
></
EditFormSettings
>
</
MasterTableView
>
<
PagerStyle
Mode
="NextPrevAndNumeric"
/>
</
radG:RadGrid
>
protected
void
radGridBaseTag_UpdateCommand(
object
source, GridCommandEventArgs e)
{
int
id
=
(
int
)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex][
"
ID
"
];
GridEditableItem item
=
e.Item
as
GridEditableItem;
GridEditManager editMan
=
item.EditManager;
GridTextColumnEditor editor
=
editMan.GetColumnEditor(
"
Name
"
)
as
GridTextColumnEditor;
protected
void
radGridBaseTag_InsertCommand(
object
source, GridCommandEventArgs e)
{
GridEditableItem item
=
e.Item.OwnerTableView.GetInsertItem();
GridEditManager editMan
=
item.EditManager;
GridTextColumnEditor editor
=
editMan.GetColumnEditor(
"
Name
"
)
as
GridTextColumnEditor;
string
name
=
editor.Text;
posted on
2007-11-28 15:59
lovebanyi
阅读(
912
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部