A New Internet Library: Add Your Website/Blog or Suggest A Website/Blog to our Free Web Directory http://anil.myfunda.net.

Its very simple, free and SEO Friendly.
Submit Now....

Thursday, July 24, 2008

Have to click Details View commands twice

 I'm using a details view to edit and update records in my database. I am using a DataSet as the datasource for the details view. The Detailsview populates fine this way, but when you click Edit or any of the command links, you have to click them twice to get the details view to kick over into edit mode and same for Update and Cancel.

Here's my ModeChanging event handler: 

protected void dvDeptInfo_ModeChanging(object sender, DetailsViewModeEventArgs e)      {          if (e.NewMode == DetailsViewMode.Edit)          {              dvDeptInfo.ChangeMode(DetailsViewMode.Edit);          }          else if (e.NewMode == DetailsViewMode.Insert)          {              dvDeptInfo.ChangeMode(DetailsViewMode.Insert);          }          else if (e.NewMode == DetailsViewMode.ReadOnly)          {              dvDeptInfo.ChangeMode(DetailsViewMode.ReadOnly);          }                }
  Am I not doing something write so these will switch over in a single click?

 



Source Click Here.

No comments:

Post a Comment

Post your comments here:

Originals Enjoy