enter image description here

I am new to XSLT coding in SharePoint, but I know that we can use XSLT coding to create a list view with more sty-lings.

I have a list named "detailsOfEmployee" with columns title, name, Id, salary, company.

I want to create a view with columns name,company,salary with a condition that salary is greater than zero. Now I am using SharePoint 2010 to create webpages. Can anyone please provide an example of xslt code for creating a list view or any link of a website which has a example with clear explanation.

  • You should always start from the code that SPDesigner generates, then customize it
    – MdMazzotti
    Apr 17 '14 at 13:29
  • Is that we have create a list view using content editor then have start editing it in share point designer ??? Apr 17 '14 at 13:32
  • I'm not sure I completely understood. Did you nest a ListView webpart within a content editor web part? Why didn't you add the LVWP directly in a webpart zone?
    – MdMazzotti
    Apr 17 '14 at 14:10
  • We can add LVWP as you told. But i want to customize my list view through XSLT, that is my requirement. Apr 21 '14 at 5:59

Edit the page in Advanced edit mode, then in Split mode, click on the XSLTListViewWebPart tag. The List View Tools tab will open. Click on Design > Customize XSLT > Customize Entire View. At this point, the default XSLT code will be shown and you can start editing.

enter image description here

  • When i try to open my aspx page in share point 2010 designer it is not allowing me and it is asking choose some options like edit in browser, edit page layout. How can i edit my aspx page in share point ? Apr 22 '14 at 10:52
  • @vinodkumar It means the page you're on is a publishing page. You can try detaching it from page layout, making your modifications, then re-attaching it
    – MdMazzotti
    Apr 22 '14 at 11:10
  • List View Tools tab is not visible in sharepoint 2010 even though after clicking on XSLTListViewWebPart tag. I have added a screen shot in my question. Apr 23 '14 at 4:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.