How to check that DetailsView is opened in Current Mode

Posted on 2010-08-22
Last Modified: 2012-05-10
I need that check that
If(DetailsView is open in Insertmode)
I am not figuring out how to do it in C sharp
Question by:Ammar Iqbal
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
LVL 53

Accepted Solution

Dhaest earned 500 total points
ID: 33498590
Did you check the CurrentMode ?

if (DetailsView1.CurrentMode == DetailsViewMode.Insert)


Expert Comment

ID: 33498610
if (DetailsView1.DefaultMode == DetailsViewMode.Insert)

Expert Comment

ID: 33498620
Dhaest's anwser is correct (ignore mine, it's monday morning for me)
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

by:Ammar Iqbal
ID: 33498692
Is it possible to open DetailsView in Insert Mode ,direcly from the menu. I mean I don't woant to open the GridsViews first and then the details View.

I need to implement a "Create na new user functionality." To do that , I want that whenever I click "New user" menu, A details View in insert mode is opened.
Yes I am opeing details View Mode in insert mode,  whenever I click the menu New user, but it first opens the gird view and i click the edit or new button in any of the rows, then a details view in inser mode is opened. I want to get rid of this Grid view from this functioanlity, and want DEtialsView  to be directly associated with the New user menu
LVL 53

Expert Comment

ID: 33498726
You can use the ChangeMode behind your button

Example: DetailsView1.ChangeMode(DetailsViewMode.Insert);

Author Comment

by:Ammar Iqbal
ID: 33498740
I do n't want to use it against a button. I want it to be opened against a menu. I want my page to be opened against a menu, once that page is opened , only detailsview  is opened in insert mode.
i don't want any grid view over here

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question