• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 690
  • Last Modified:

How to check that DetailsView is opened in Current Mode

I need that check that
If(DetailsView is open in Insertmode)
{
-----
}
I am not figuring out how to do it in C sharp
0
Ammar Iqbal
Asked:
Ammar Iqbal
  • 2
  • 2
  • 2
1 Solution
 
DhaestCommented:
Did you check the CurrentMode ?

if (DetailsView1.CurrentMode == DetailsViewMode.Insert)

0
 
tn-vadimcCommented:
if (DetailsView1.DefaultMode == DetailsViewMode.Insert)
...
0
 
tn-vadimcCommented:
Dhaest's anwser is correct (ignore mine, it's monday morning for me)
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
Ammar IqbalSenior IT Consultant/senior Software engineerAuthor Commented:
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
 
DhaestCommented:
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
 
Ammar IqbalSenior IT Consultant/senior Software engineerAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now