ASPxGridview更改内联EditForm中的默认值

时间:2011-01-16 01:31:01

标签: vb.net devexpress 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