Writing to Cells in the Detailsview Insertmode makes cells uneditable.

S

SixStringSlaya

I am trying to write a text to a cell in the Detailsview after the user
clicks on New.

When I do this, the Detailsview makes that cell uneditable. How do I
get that cell back into the edit mode so that the user can overwrite my
text.

Here is the code.

Protected Sub DetailsView1_PreRender(ByVal sender As Object, ByVal
e As System.EventArgs) Handles DetailsView1.PreRender
Dim x As Integer
x = 2

If DetailsView1.CurrentMode = DetailsViewMode.Insert = True
Then
Me.DetailsView1.Rows(x).Cells(1).Text = "Wayne123"
End If
End Sub

Thanks,

Wayne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top