3

in details view once i click edit mode. all the controls are getting into edit mode. i make the changes and give update data is updated in database . but still all the controls are in edit mode only "actaully once we give click then update then i should again gone to read only mode means all the values should again be showing in label field"

i am doing this in .cs file only no sqldatadource is used or object datasource

right now this feature is not happening to me. what is the issue here?

looking forward for an solution thank you

Muhammad Akhtar
  • 51,913
  • 37
  • 138
  • 191
happysmile
  • 7,537
  • 36
  • 105
  • 181

1 Answers1

2

Since you aren't using any built-in code to do the update, you probably need to change the display mode manually during your update.

myDetailsView.ChangeMode( DetailsViewMode.ReadOnly );
tvanfosson
  • 524,688
  • 99
  • 697
  • 795
  • ya added this line of code in ItemUpdating event that is after i do update to database: { myDetailsView.ChangeMode( DetailsViewMode.ReadOnly ); } but i get an error telling that as you are in edit mode you cannot do readonly here – happysmile Nov 22 '09 at 14:36