For Each dgitem In mydg.Items
ck = CType(dgitem.Cells(0).FindControl("ck"), CheckBox)
Dim bSelected as Bollean
bSelected =false
If ck.Checked Then
dkey = mydg.DataKeys(dgitem.ItemIndex)
deldb(dkey)‘--删除数据
' dbind()’--涮新datagrid
' Exit For
bSelected =true
' Else
' warn.showmsg(Me, "请选择要删除的记录!")
' Exit For
End If
NextIf bSelected Then
dbind()
Else
warn.showmsg(Me, "请选择要删除的记录!")
End If
ck = CType(dgitem.Cells(0).FindControl("ck"), CheckBox)
Dim bSelected as Bollean
bSelected =false
If ck.Checked Then
dkey = mydg.DataKeys(dgitem.ItemIndex)
deldb(dkey)‘--删除数据
' dbind()’--涮新datagrid
' Exit For
bSelected =true
' Else
' warn.showmsg(Me, "请选择要删除的记录!")
' Exit For
End If
NextIf bSelected Then
dbind()
Else
warn.showmsg(Me, "请选择要删除的记录!")
End If
解决方案 »
- 发生这样的错误原因是什么?
- 省市级连 采用DropDownList
- 寻求解决方案(高手们看过来)
- 大家进来帮我解释段Ajax代码.谢谢!!
- 请各位师兄 OR 师姐 帮帮小弟!在.net 2005 c# 中如何操作xml啊!!!
- 【急】怎样用vs.net打开源文件不在 /wwwroot 目录下的asp.net程序
- 思归大哥,孟子大哥,你们也来帮忙看看吧...
- 关于配置服务器的ASP.NET站点的帐号权限的问题。多谢
- 如果在ASP.NET中实现网页打印?
- 如果禁用提交
- 初学者关于导入命名空间的疑问
- 我想在TreeView控件的每个结点的后面都加一个连接(LinkButton),当点击连接时连接到另一个页;现在问题是我不知道怎么能把这个连接添加
Dim ck As CheckBox
Dim dkey As String
For Each dgitem In mydg.Items
ck = CType(dgitem.FindControl("ck"), CheckBox)
If ck.Checked Then
dkey = mydg.DataKeys(dgitem.ItemIndex)
deldb(dkey)‘--删除数据
dbind()’--涮新datagrid
Exit For
Else
warn.showmsg(Me, "请选择要删除的记录!")
Exit For
End If
Next
Dim dgitem As DataGridItem
Dim ck As CheckBox
Dim dkey As Integer For Each dgitem In mydg.Items
If dgitem.ItemType <> ListItemType.Header And dgitem.ItemType <> ListItemType.Footer And dgitem.ItemType <> ListItemType.Pager Then ck = CType(dgitem.FindControl("ck"), CheckBox)
Dim boolstr As Boolean
boolstr = ck.Checked
If boolstr = True Then
dkey = mydg.DataKeys(dgitem.ItemIndex)
deldb(dkey)
Else
warn.showmsg(Me, "请选择要删除的记录!")
End If End If
Next
dbind()