ASPxGridview 更改内联 EditForm 中的默认值
我试图在编辑表单中的值对用户可见之前更改它。然而 aspxgridview 总是覆盖它。
这是我的解决方案:
Protected Sub ASPxGridView_ItemList_HtmlRowCreated(ByVal sender As Object, ByVal e As DevExpress.Web.ASPxGridView.ASPxGridViewTableRowEventArgs) Handles ASPxGridView_Items.HtmlRowCreated
If (e.RowType = GridViewRowType.EditForm) Then
Dim ASPxTextbox_Number As ASPxTextBox = TryCast(TryCast(sender, ASPxGridView).FindEditFormTemplateControl("ASPxTextbox_Number"), ASPxTextBox)
ASPxTextbox_Number.Text = "99"
End If
End Sub
I'm trying to change the value in an editform before it becomes visible to the user. However the aspxgridview is always overwriting this.
This is my solution:
Protected Sub ASPxGridView_ItemList_HtmlRowCreated(ByVal sender As Object, ByVal e As DevExpress.Web.ASPxGridView.ASPxGridViewTableRowEventArgs) Handles ASPxGridView_Items.HtmlRowCreated
If (e.RowType = GridViewRowType.EditForm) Then
Dim ASPxTextbox_Number As ASPxTextBox = TryCast(TryCast(sender, ASPxGridView).FindEditFormTemplateControl("ASPxTextbox_Number"), ASPxTextBox)
ASPxTextbox_Number.Text = "99"
End If
End Sub
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅如果初始值为在这方面,在 HtmlRowCreated 事件 示例中以编程方式进行设置。
Please refer to the How to update an ASPxGridView DataSource if the initial values are set programmatically in the HtmlRowCreated event example in this regard.