Hi,
I have a gridView. Also I have put adetailView inside the EmptyDataTemplate of the GridView to insert data into the GridView when there is no record. The DetaisView appears when user click Add(beside the Edit button) in the GridView. In the DetailsView I can insert data by entering values in the textboxs and clicking the Insert button. My problem is, the GridView is not coming back. What doI have to do, so that after clicking insert theGridView wil appear with the new data?
In the code page I have following code:
Partial
Class Details
Inherits System.Web.UI.Page
Protected Sub gvDeferredDt_RowCommand(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) _
Handles gvDeferredDt.RowCommand
If e.CommandName = "Add" Then
gvDeferredDt.DataSourceID =
""
gvDeferredDt.DataBind()
End If
End Sub
Protected Sub dtvInsertDefferedDt_ItemInserted(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.DetailsViewInsertedEventArgs)
gvDeferredDt.DataSourceID =
"odsrcDeferredDt"
gvDeferredDt.DataBind()
End Sub
Thanks,