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.开发者_如何学CEditForm) Then
Dim ASPxTextbox_Number As ASPxTextBox = TryCast(TryCast(sender, ASPxGridView).FindEditFormTemplateControl("ASPxTextbox_Number"), ASPxTextBox)
ASPxTextbox_Number.Text = "99"
End If
End Sub
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.
精彩评论