Dynamically add Editor Template on click of a button - asp.net-mvc-4

In my MVC4 project I have used an Editor Template for user input. I have define a constant(say 4) and called it in a for loop, so there is always a constant number of 4 templates displayed on the view.
I want to change this and make it dynamic, ie when the user clicks on a button, a new Editor Template should be displayed dynamically. When he again clicks on the button, a third one will be displayed and so on.
Do I need to use angularJS for this or is it possible to do it in .net itself? How do I achieve this? Thanks.

Related

Add global button in CRM

Is there a way to add a new button to ALL PAGES in CRM?
I have tried different ways but in some views, the new button is shown at the end. Im trying to found a way to create a button and place it as first button, to any view, entity and page in CRM. Is this accomplisable?
I'm afraid that out-of-the-box buttons will often take precedence over custom buttons, and the only way to change that would be to hide the out-of-the-box buttons.
I'm assuming you are adding the button via the Application Ribbon, correct? (not every single form and grid)
You can add items to the "Jewel", (the dropdown from "File" in the top left). It's not exactly the same as putting it in the ribbon because you have to make an extra click, but it should show up globally.

How do I implement this type of dynamic UI in a Razor view?

I will start by saying that I am an absolute newbie to web development and to MVC as well.
I want to implement a view for a Subscriber page (part of an MVC4 application dealing with Email marketing). What I want to implement is:
1) When the user clicks the "+ Add a List" button, a new Category should appear on the left and the cursor should blink, meaning it should be ready to receive the name for the category from the user. I also want that whenever the user hovers over any category name on the left, a small bar containing two buttons (edit and delete) should appear which should let the user edit the category name or delete that category. The thing I want is that all of these must happen without reloading the page.
2) When the user clicks the "+ Add Contact" button, a pop up dialog box containing two tabs should appear which lets the user either manually enter the details or upload a CSV to capture the details. Whenever the user clicks the "Add Contact" button or "Upload and Add Contacts" in the pop up dialog box, I want the new contacts to display in the contact list region shown in the picture (once again, without reloading the page). I also want the same hover bar for the contacts too (same as categories).
I am confused as to how to implement this in a Razor view? What do I use - JavaScript/jQuery/AJAX?
I am pretty much lost. Can someone please guide me a little bit so that I can continue and finish my first MVC4 project?
You need some javascript libraries like jQuery UI or maybe Kendo UI, I'd recommend to use jQuery UI at this time. they have many widgets but look at these. and keep in mind that a cshtml view can be look upon like a html page, you can have all tags, css and javascript you want there:
http://jqueryui.com/dialog/
http://jqueryui.com/tabs/
http://jqueryui.com/

How to create a nice add button to list view like in the Weather app?

Following these steps:
Open the Weather app.
Right click
Click on places
See that little item with the + symbol? I want to do something exactly like that, the looks and behaviour.
Assuming you are just trying to get some basic ideas about metro-ui controls and you are on Release Preview.
When you do right click, the control that's being triggered is called App Bar. The "place" button is a App Bar Command. Clicking on the button will take you to another page (HTML or XAML). This page contains a ListView control with GridLayout. You can dynamically change the ListView Template and assign different actions to the itemInvoke event.
Here is a quick tutorial for App Bar and commands:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465309.aspx
Here is a quick tutorial for List View control:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465496.aspx

bring page to foreground? multipage editor

I'm develpping an RCP user interface. I have a multipage editor in which pages are editors (EditorPart). From a first page in my multipage editor I want to open a second one if a button is pressed. I've managed to do that but the problem that I'm facing is that the created page is visible only if we switch to it, i.e only the tab is visble.. what I want is to directly switch to the new page automatically after its creation. In other words, how can I bring the new page to foreground exactly when it is created.
Can you help me please
Kind Regards,
Jean
It seems to me that the calling the method org.eclipse.ui.part.MultiPageEditorPart.setActivePage(int) should do the trick.

Is it possible to make a statusbar like notepad in VB?

I made a notepad using vb 2008 and I am facing a problem who I'd make the Statusbar.
any idea will be great.
Note: I am using the Textbox to read and write text
Thank you
You need to add a StatusStrip control to your form.
To find it, open the Toolbox, expand the "Menus & Toolbars" section, and double-click on the one named "StatusStrip".
Double-clicking on the control in the Toolbox will automatically add it to your form, and dock it along the bottom, just like it is in Notepad.
Once the control is there, you can customize it by changing properties in the Properties window. If you want to add information to the status bar, you do that by adding sub-controls inside of it. Click the drop-down arrow next to the "new" icon, and you'll see a list of possible choices:
"StatusLabel" — displays static text
"ProgressBar" — displays a progress bar, indicating the progress of a background operation
"DropDownButton" — displays a drop-down button, to allow a choice of multiple options
"SplitButton" — displays a drop-down button that allows a choice of multiple options, but also invokes the default option by a single click on the button.