Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Opening a DEtailsView without a GridView  directly from the menu

Posted on 2010-08-23
9
Medium Priority
?
218 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
[X]
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
  • 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 1500 total points
ID: 33499997
Can't you put the DetailsView1.ChangeMode(DetailsViewMode.Insert); code in the Page_Load function?
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
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
 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

704 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