就是这个效果,报错是因为我还没有设置那个显示详细信息的页面。
编写过程有三点比较重要:
1.为行添加脚本事件,我的方法是:
[C#]
纯文本查看
复制代码
1
2
3
4
5
6
7
8
9
|
<ClientSideEvents RowDblClick="function(s,e){
var rowIndex=gridView.GetFocusedRowIndex();
gridView.GetRowValues(rowIndex,
'BMCode'
,function(values){
var url=
'DicCategoryDetails.aspx?nid='
+values;
ASPxPopupControl1.SetContentUrl(url);
ASPxPopupControl1.Show();
})
}" />
|
2、添加一个弹出的控件
[HTML]
纯文本查看
复制代码
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
|
<
dx:ASPxPopupControl
ID
=
"ASPxPopupControl1"
runat
=
"server"
AllowDragging
=
"True"
CloseAction
=
"OuterMouseClick"
EnableViewState
=
"False"
PopupHorizontalAlign
=
"WindowCenter"
PopupVerticalOffset
=
"40"
ShowFooter
=
"True"
Width
=
"90%"
Height
=
"400px"
FooterText
=
"欢迎使用江西省普通高校招生辅助管理系统"
HeaderText
=
"查看系统应用详细信息,可窗口拖动并调整尺寸大小哦!"
ClientInstanceName
=
"ASPxPopupControl1"
PopupAnimationType
=
"Fade"
Modal
=
"True"
ShowOnPageLoad
=
"false"
RenderMode
=
"Lightweight"
AllowResize
=
"True"
>
<
ContentCollection
>
<
dx:PopupControlContentControl
ID
=
"PopupControlContentControl1"
runat
=
"server"
SupportsDisabledAttribute
=
"True"
>
</
dx:PopupControlContentControl
>
</
ContentCollection
>
</
dx:ASPxPopupControl
>
|
3、通过SetContentUrl传入想要使用的网址和记录的参数
需要注意的是:
SettingsBehavior中要设置AllowFocusedRow="True",这点很重要。