开发者

Modify default action in a SharePoint List

to a list, I added a custom action that shows i开发者_StackOverflown the drop-down menu on AllItems.aspx and points to a custom page.

However, I want it to be the default action, so that clicking on the item doesn't go to DispForm.aspx

Any tip? Thanks


From your question I understood that while clicking on item from allitem.aspx you need to navigate to a custome page. You can do it in three ways

1. Create a dataview webpart and customise the title item.

2. Using Javascript

a. Edit the dispform.aspx page (add &toolpaneview=2&sharedview=true in in dispform.aspx url)

b.Closs the existing webpart

c.s Add a richtexteditor webpart and write a JavaScript to redirect to your custom page(location.href=custompage.aspx) .

Note: You can get the item id from the querystring using JavaScript if required.

3. New Webpart Instead of the custom page write a webpart, which has the functionality of your custom page, and add it in display form.


you can also do this by javascript on the allitems.aspx - edit the page, add content editor web part and follow these directions. the javascript is referencing the edit control block.

http://weblogs.asp.net/jan/archive/2009/09/04/customizing-the-sharepoint-ecb-with-javascript-part-2.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜