Solved

Opening a DEtailsView without a GridView  directly from the menu

Posted on 2010-08-23
9
204 Views
Last Modified: 2012-05-10
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
Comment
Question by:Ammar Iqbal
  • 4
  • 3
  • 2
9 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 33498737
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: 33498758
Changing mode for a dEtailsMode is not a problem, As it is in my question description, that I want to use details view to create a new user, and i should not be dependant to any gridview. Just like we create an new page for new user creation , that page is openied against a menu. I am doing all that stuff in detailsview insert mode.

The only thing I needed is t owork only with DetailsView ion this page.
I hope you have understood my question
0
 
LVL 6

Accepted Solution

by:
ingriT earned 500 total points
ID: 33499997
Can't you put the DetailsView1.ChangeMode(DetailsViewMode.Insert); code in the Page_Load function?
0
 
LVL 1

Author Comment

by:Ammar Iqbal
ID: 33500023
I did this already, but my question is something ellse. Please read my statment carefully.
Changing mode for a dEtailsMode is not a problem, As it is in my question description, that I want to use details view to create a new user, and i should not be dependant to any gridview. Just like we create an new page for new user creation , that page is openied against a menu. I am doing all that stuff in detailsview insert mode.
 
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 6

Expert Comment

by:ingriT
ID: 33500048
Can't you add a gridview, with only an inserttemplate then?
Why not use a Gridview for this? And maybe you can change your topic title, because this is probably the confusing part of your question.
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 33500058
Can you take a look at this: http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/data/detailsview.aspx

The last example is doing what you expect I believe.. see the button "Add new author"
0
 
LVL 1

Author Comment

by:Ammar Iqbal
ID: 33500064
I do not want to use a grid view, my question is simple clear, that I need to use DEtailsView  in insert mode independetly of Gridview against the Menu items. Need some idea of how to use detailsview independently
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 33500094
I understand that, but If you take a look at the code behind of the example, perhaps you can add the same behind your menu-structure. The example will open a new, empty, detailview where you can insert your data.

Also here you can find an example where no gridview is used
Walkthrough: Editing and Inserting Data in Web Pages with the DetailsView Web Server Control  
http://msdn.microsoft.com/en-us/library/sdba1d59(v=VS.80).aspx
0
 
LVL 1

Author Closing Comment

by:Ammar Iqbal
ID: 33619023
solution was partial
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now