AspxGridview 不支持所指定的方法

挂日的木木 2010-09-13 05:21:27


Protected Sub grid_CustomCallback(ByVal sender As Object, ByVal e As DevExpress.Web.ASPxGridView.ASPxGridViewCustomCallbackEventArgs)
If e.Parameters = "Cancel" Then
grid.CancelEdit()
End If
If e.Parameters = "Update" Then
grid.UpdateEdit()

End If
If Session("Dt2").ToString() <> "" Then
If CType(Session("Dt2"), DataTable).Rows.Count > 0 Then
grid.DataSourceID = ""
grid.DataSource = CType(Session("Dt2"), DataTable)
End If
Else
grid.DataBind()
End If


grid.DataBind()
End Sub

Protected Sub grid_RowUpdating(ByVal sender As Object, ByVal e As DevExpress.Web.Data.ASPxDataUpdatingEventArgs)
Dim EditDt As DataTable = CType(ViewState("Dt1"), DataTable).Clone()
Dim NewDt As DataTable
Dim Dt1 As DataTable
If Session("Dt2").ToString() <> "" Then
If CType(Session("Dt2"), DataTable).Rows.Count > 0 Then
EditDt = CType(Session("Dt2"), DataTable)
End If
End If

If EditDt.Rows.Count > 0 Then
Dt1 = EditDt.Copy()
Else
Dt1 = CType(ViewState("Dt1"), DataTable)
End If
NewDt = Dt1.Clone()
Dim dr() As DataRow
dr = Dt1.Select("1=1")
For i As Integer = 0 To dr.Length - 1
If dr(i)("key_seq") = e.NewValues("key_seq") Then
dr(i)("type") = e.NewValues("type")
dr(i)("ship_to_addr") = e.NewValues("ship_to_addr")
dr(i)("billing_addr") = e.NewValues("billing_addr")
dr(i)("description") = e.NewValues("description")
dr(i)("country") = e.NewValues("country")
dr(i)("vatax_no") = e.NewValues("vatax_no")
dr(i)("ean_code") = e.NewValues("ean_code")
dr(i)("address1") = e.NewValues("address1")
dr(i)("address_txt1") = e.NewValues("address_txt1")
dr(i)("address_txt2") = e.NewValues("address_txt2")
dr(i)("address_txt3") = e.NewValues("address_txt3")
dr(i)("district_txt") = e.NewValues("district_txt")
dr(i)("zip_code") = e.NewValues("zip_code")
dr(i)("city_txt") = e.NewValues("city_txt")
dr(i)("state_txt") = e.NewValues("state_txt")
End If
NewDt.ImportRow(CType(dr(i), DataRow))
Next

Session("Dt2") = NewDt

grid.DataSourceID = ""
grid.DataSource = NewDt
grid.DataBind()






<EditForm>
......
<td style="white-space: nowrap; width: 150px" align="right" colspan="2">
<input type="button" value=" O K " onclick='grid.PerformCallback("Update");' />
<input type="button" value="Cancel" onclick='grid.PerformCallback("Cancel");' />
</td>
.............
</EditForm>
...全文
508 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
小路子的宝 2012-01-06
  • 打赏
  • 举报
回复
我也是 不知道怎么解决
阿日斯朗 2011-09-19
  • 打赏
  • 举报
回复
我也遇到同样的问题,解决不了

16,554

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧