SharePoint: Extended DVWP-Part 2: Using icon form operation links

Source: Internet
Author: User
Document directory
  • Icon the hyperlink

The last time, we finally processed the appearance of our DVWP and implemented1-5. This time, we will continue to complete the remaining6And7To add an icon for it.

In the middle of this series,Greg Schaefer provides a good suggestion.For this reason, I plan to change the form operation link to the icon form. Greg recommends that you referPeter AllenRelatedSharePoint Layout ImagesUsing some built-in SharePoint images to replace the default form operation links: update, remove, and insert.

This article can also be seen as a response to Greg's suggestion.

Icon the hyperlink

Peter mentioned that searching for the SharePoint Layout Images directory can often find many useful image resources./_ Layouts/images/Path.

The following figure shows the appropriate icons:

Update

Edititem.gif

Remove

Crit_16.gif

Insert

Newitem.gif

 

They are also easy to use:

  1. Click link
  2. Replace the original link text with an image:
  3.     
    <a href="javascript: {ddwrt:GenFireServerEvent(concat('__cancel;dvt_1_form_editkey={',$KeyValue,'}'))}">update</a>

    ... Changed:

    <a href="javascript: {ddwrt:GenFireServerEvent(concat('__cancel;dvt_1_form_editkey={',$KeyValue,'}'))}"></a>

    Repeat this step on the remove link. Here is an image that can be used for removing:

    Remove

    Delitem.gif

    With the image, you do not need to add a vertical line... However, you still need to define the blank outer border:

    <td class="ms-vb" width="1%" nowrap="" style="padding-left=3px"><a href="javascript: {ddwrt:GenFireServerEvent(concat('__cancel;dvt_1_form_removekey={',$KeyValue,'}'))}"></a></td>
  1. For Insert, I also added some description text:
    <a href="javascript: {ddwrt:GenFireServerEvent('__cancel;dvt_1_form_insertmode={1}')}"> Add a new employee</a>

So far... Packaging is completed.

Now, we have gone through 34 parts. Except connecting all the content into a complete solution, there is nothing left. Next time, we can complete our DVWP series extension.

References

SharePoint: Extending the DVWP-Part 34: Using Icons for Form Action Links

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.