views:

119

answers:

2

I have read all the list events (and list item events) of sharepoint 2010, but it seems there isn't a way to get an event when a list item gets just selected (or double-clicked, or something like that) I want a method that lets me open a new page when someone selects an item on the list, to display more information regarding the item Is there a way to do this?

Thanks

+2  A: 

Not sure what you are trying to do here. But by default, when you click on the title of the Sharepoint item, it opens the item details showing you all properties for that item. You can customize the display form as you need. Another options are: 1) Customize the ribbon and adda button which can display a page in a dialog box. See "Custom Actions" in Sharepoint SDK 2) Add a custom menu item the context menu of the item in the list and open a custom page showing the information you need.

Ashish Patel
Ashish what do you mean exactly with: "2) Add a custom menu item the context menu of the item in the list and open a custom page showing the information you need."? What is a context menu? Where is it?
Maik
Well, in SharePoint, you can extend the contxt menu for a document or list item entry in Document Library or a List respectively. It is also referred as "ECB Menu Item" in documentation. Please check http://msdn.microsoft.com/en-us/library/ff394532.aspx for an example.
Ashish Patel
+1  A: 

You can edit the default DispForm.aspx page and add more Web Parts.

Example (it's SharePoint 2007, but the same thing can be done in SharePoint 2010)

alt text

By default, SharePoint 2010 shows item details in a popup dialog.
If you want to edit the DispForm.aspx page, you need to go to List Settings / Advanced settings and set Launch forms in a dialog? to No; clicking an item will now load a full page. You can edit this page (Site Actions / Edit Page) and add some Web Parts. These Web Parts will be visible on the full page as well as the popup dialog, so you can switch Launch forms in a dialog? back to Yes.

Marek Grzenkowicz
Title (linked to item) works as a clickable link. But obviously it just shows me the same details i can have in the columns of the list. What i need to do is create a page where i can insert this standard information and add other things such as a list of related documents. Anyway i got a solution: in my list i can create a hyperlink field, in which i pass the item id as an url parameter. This way in the page that opens i know which item has been clicked =)
Maik
Yeah it would be similar to yours! But how do yuo het there as a page? I mean, in SP 2010 when i click on the item title i get a small popup window, not an entire web page. WHere do i find this DispForm.aspx? Can i edit it in visual studio?
Maik
Woa it's great! I think this should work, let's see what does my chief think about it ^^
Maik
This solution would be ok, but we prefer to create a new button in the ribbon as suggested by Ashish Patel. Now i'm downloading the SDK, tomorrow i'll start studying how to do it. Thanks guys!
Maik
It seems i have some problems adding a new button to the ribbon. I asked a new question here: http://stackoverflow.com/questions/3930970/sp2010-how-to-create-a-new-button-in-the-ribbon
Maik