locked
Highlighting list items RRS feed

  • Question

  • This is probably a simple answer with a difficult response, but I will ask anyway.  I have searched these forums using a number of terms without a useful outcome.

    Is it possible to highlight list items based on defined criteria.  In our case we have a date field functioning as a required-by value, after which I hope to colour them in the list view.  Have you achieved something similar, and if so, can you recommend an appropriate method to do so?

    Many thanks in advance.
    Wednesday, July 30, 2008 5:33 AM

Answers

  • Hi,

    Since you're asking in the Development and Programming section, I'll try to give to samples as follows:

    If you're using the Content Query WebPart, you could always manipulate the XSLT if it matches some given criteria and hence highlight that row with a backgroundcolor or what not.

    If you're using a SPGridView and creating your own list that way, there's no end to what you can do by manipulating the item templates.

    If that doenst help, my counterquestion is;
    Are you developing your own list, or simply using the built-in ones and want to customize them?
    Wednesday, July 30, 2008 6:09 AM
  • You might also be able to do this kind of thing with a data form web part via sharepoint designer.
    --Paul Galvin of www.Conchango.com @ http://feeds.feedburner.com/PaulGalvinsSharepointSpace
    Wednesday, July 30, 2008 11:00 AM
  • Here is the link for Paul's suggestion (Conditional Formatting using SharePoint designer).
    http://office.microsoft.com/en-us/sharepointdesigner/HA100996241033.aspx


    Posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, July 30, 2008 1:18 PM

All replies

  • Hi,

    Since you're asking in the Development and Programming section, I'll try to give to samples as follows:

    If you're using the Content Query WebPart, you could always manipulate the XSLT if it matches some given criteria and hence highlight that row with a backgroundcolor or what not.

    If you're using a SPGridView and creating your own list that way, there's no end to what you can do by manipulating the item templates.

    If that doenst help, my counterquestion is;
    Are you developing your own list, or simply using the built-in ones and want to customize them?
    Wednesday, July 30, 2008 6:09 AM
  • Hi Tobias,

    Thank you for your prompt response.  Your first comment made me realise I have assumed custom development would be required to achieve this (hence the post in this section), but to firstly answer your counter-question, I have simply used SP's default list views for the proof of concept of our application.  I had assumed, perhaps naively that it would be possible to customise the default list view.

    That said, I am very quickly learning more about SharePoint and using a Content Query WebPart and modifying the XSLT might be an interesting thing to cut my teeth on.  (XSLT is still quite foreign to me but obviously a fundamental knowledge requirement for SP!)
    Wednesday, July 30, 2008 6:17 AM
  • You might also be able to do this kind of thing with a data form web part via sharepoint designer.
    --Paul Galvin of www.Conchango.com @ http://feeds.feedburner.com/PaulGalvinsSharepointSpace
    Wednesday, July 30, 2008 11:00 AM
  • Here is the link for Paul's suggestion (Conditional Formatting using SharePoint designer).
    http://office.microsoft.com/en-us/sharepointdesigner/HA100996241033.aspx


    Posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, July 30, 2008 1:18 PM