Solved

How to check that DetailsView is opened in Current Mode

Posted on 2010-08-22
6
643 Views
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
0
Comment
Question by:Ammar Iqbal
  • 2
  • 2
  • 2
6 Comments
 
LVL 53

Accepted Solution

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

if (DetailsView1.CurrentMode == DetailsViewMode.Insert)

0
 
LVL 2

Expert Comment

by:tn-vadimc
ID: 33498610
if (DetailsView1.DefaultMode == DetailsViewMode.Insert)
...
0
 
LVL 2

Expert Comment

by:tn-vadimc
ID: 33498620
Dhaest's anwser is correct (ignore mine, it's monday morning for me)
0
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
LVL 1

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
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 33498726
You can use the ChangeMode behind your button
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.detailsview.changemode.aspx

Example: DetailsView1.ChangeMode(DetailsViewMode.Insert);
0
 
LVL 1

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
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 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