1

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.

4
  • You should always start from the code that SPDesigner generates, then customize it
    – MdMazzotti
    Commented Apr 17, 2014 at 13:29
  • Is that we have create a list view using content editor then have start editing it in share point designer ??? Commented Apr 17, 2014 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
    Commented Apr 17, 2014 at 14:10
  • We can add LVWP as you told. But i want to customize my list view through XSLT, that is my requirement. Commented Apr 21, 2014 at 5:59

1 Answer 1

1

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

3
  • 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 ? Commented Apr 22, 2014 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
    Commented Apr 22, 2014 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. Commented Apr 23, 2014 at 4:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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