Solved

How to check that DetailsView is opened in Current Mode

Posted on 2010-08-22
6
639 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASCX file or a newer alternative? 1 35
Alert on Server memory 2 22
Help with exporting to excel 4 27
List<PaisEntity> - show some 1 24
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

773 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