Sharepoint 2010 List and Visual Studio - visual-studio-2010

as a newbie to Sharepoint.... I have created a simple list with several columns in Sharepoint 2010.
I now want to add a button on the List that I can programmatically add some onClick events to do the following:
get a handle on some of the columns in the list;
Distribute an email automatically based on the content of some of the columns
I am looking at using c# via Visual Studio 2010 for all the programmatic aspect of this development.
Is it possible to export the xml from Sharepoint 2010 then import into Visual Studio 2010 so that I can use the list I created as my starting point for the coding work? If so, how do I go about this?
Thanks.

You'll have to setup Visual Studio to work with Sharepoint.
Install it on a server that has Sharepoint 2010 running.
You can then create a webpart that incorporates the list (or a view on it) and add the button to that list.
But I imagine that you'll want to work on a specific row. So what you want is a Custom Action on that list (Visual Studio has a template for that: Add -> New Item -> Custom Action).
The Custom Action will create a new item in the Edit Control Block (the context menu that appears for every item in the list).
I prefer to create the ECB (Edit Control Block) menu items using JavaScript. In the page load I inject a jSon string that has additional information about each of the rows, and a JavaScript function then is called by the builtin SharePoint javaScript function that creates the ECB.
The JavaScript function you'll have to create is Custom_AddListMenuItems .
In that function you'll call CAMOpt to create menu items. If you want SharePoint to create the built-in menu items (and Custom Actions you created), set the return value of the Custom_AddListMenuItems function to true. (And fals if you don't want to see the built in ECB menu items and any Custom Actions you created)
You can start here:Jan Tielens Blogging's
Hope this helps.

Related

NSIS Uninstall Feedback Dialog with Radio Buttons

I am trying to show a simple dialog before uninstall in NSIS. It consists of several predefined radio buttons (reasons for uninstalling), none of them checked initially. Uninstallation cannot continue until a user selects one of the radio buttons.
As a bonus, ideally I would like to have a custom reason text field too (toggle-able via last radio button). As well as 2 more text fields for custom text and email.
Then I need to take selected value(s) (checked radio button) as well as text fields data and either append it to my predefined URL to which I make a GET request using InetC or similar plugin before uninstaller exits; or laternatively construct a POST request to a predefined URL using InetC or similar plugin. I cannot figure out how to create such a dialog page. Any help would be appreciated.
What I am looking for:
First, you should get familiar with nsDialogs to create the interface according to your needs. Since nsDialogs is a function, you would then can call it as a custom page.
You can use my tool Visual & Installer (www.visual-installer.com) for Visual Studio 2005 - 2015 to fast write the NSIS code.
(If you are "writing" the installer - I assume you have some experiences with nsDialogs).
Also there are some other tools like NSIS Dialog Designer (http://forums.winamp.com/showthread.php?t=329801) which can help you and generate lot of code for you.
This tool is GUI based - designer similar to Visual Studio designer - but remember: the result is still the scripts!

Is it possible to extend the PBI View of TFS in Visual Studio?

I am using Visual Studio 2012, TFS 2012, and I want to do this for PBI (Product Backlog Items)
I would like to add a "button" or something of the sort to help me create Tasks for my PBIs. (This is something I have been requested to do).
So as I am Viewing a PBI or a List of PBIs I could have a button that popups a Window inside Visual Studio with some options which will trigger the creation of different tasks and such. Is this possible?
Or should I create a separate program that will allow me view the WorkItems and implement the functionality there (for example with C#/WPF)
You should look at following links. Looks like you are looking to create/update work items in bulk. You can easily import your pbi work items to excel and add/update in bulk or also use work item templates for that.
If that doesn't work then you can write code using TFS API to create work items and do other things as well. Using that you can have your own form and add custom steps and then call Api to create the work items.
TFS API to create work items:
https://social.technet.microsoft.com/wiki/contents/articles/3280.tfs-2010-api-create-workitems-bugs.aspx
Use work item templates to pre-populate fields:
http://msdn.microsoft.com/en-us/library/ff407162.aspx
Bulk add or modify work items with Excel:
http://msdn.microsoft.com/en-us/library/dd286627.aspx
Bulk modify work items:
http://msdn.microsoft.com/en-us/library/hh409280.aspx
This already exists out of the box. When viewing a PBI go to the Tasks tab and click New. It will create a new Task that is automatically linked back to the PBI. It will also set the Iteration and Area to match the Parent PBI.

Make a Customized LayoutRoot as a template for creating New layouts

Good day, am still a beginner to Windows Phone and visual studio environment so apologies in advance. In Visual Studio, when creating a new layout we have the LayoutRoot by default. After having this LayoutRoot customized(with set rows and columns and a postioned TextBlock), is it possible to make the layout like a base template so that when one starts a new layout, it can have this customized Layout as its LayoutRoot. How can i do this or do i have to copy this values to every new layout that i intend to create. Many Thanks
Three options come to mind here.
You can make a visual studio item template for your customized page where you can easily add it to new projects. Check this tutorial on how to make item templates: Visual Studio - How To Create Item Templates
You can make a base page with the customized xaml and have your other pages inherit from it.
You can make user controls responsible for specific UI parts and then add these controls to pages whenever needed.

What ListBox like control is used in Collections Editor of Visual Studio

I need to create a from which uses the same ListBox as the one from Collection Editor of Visual Studio (The ListBox under the Members label). Please, explain exactly which WinForms control is this and which of its properties are set?
You can see the control I am asking about under the Members: label of every collection editor form in design time of Visual Studio.
Thank you.
Hopefully this can get you started. There's other (probably better...) samples out there, but this is a basic starter which can help you get the concept:
http://msdn.microsoft.com/en-us/library/9zky1t4k%28VS.90%29.aspx
Quote:
This example shows how to create a
control named ContactCollectionEditor
that implements a custom collection
editor. The example shows how to
specify the exact type of the object
that a page developer can add to the
control's collection property when
using a custom collection editor. You
associate a collection editor with a
collection property (or the type of
the property) by applying the
EditorAttribute to the collection
property of the control.

How to do design list view like SharePoint 2010 Custom List or Document Library?

I am generation Recent Activity list from SharePoint 2010 site,
What i need is ,i have to display the list in a particular page,The UI must be like a SharePoint 2010 Custom List or Document Library,
How to design it, Is there any way to do this.
If your data source is a SharePoint list, you could use the [ListViewWebPart][1] to achieve this. What exactly are the requirements of the view - should you also include the context-sensitive menu ("Edit properties" etc) ? If not, you could just create a custom web part and override the CreateChildControls method, and there mimic the html/css that is rendered in a document library.

Resources