none
Is it possible to add colored text to a List Column Description?

    Soru

  • I am using MOSS 2007.

    What I am trying to do is add colored text to a List Column description field.  The list is the Absence list from the Absence and Vacation template, and I want to color the description text of the Title Column red.  Is there a way to accomplish this?  I tried using HTML tags, but they show up as plain text in the description when entering a new absence.

    Thanks!

    22 Şubat 2012 Çarşamba 14:08

Yanıtlar

  • Ahhh!  We all taught you were trying to edit an actual list view!

    You can edit that no problem.  You will just need to hide the current webpart (preview of List form web part) and insert a custom list form.

    The handiest way to do this is to click on the current web part and then click the right arrow.  This will deselect the web part and leave the cursor in the correct position right after the web part.

    Next, click on Insert > Sharepoint Controls > Custom List Form...

    Under list or document library to use for form: choose your current library.  Then choose the content type if different from the normal Item.

    Now you need to hide the original web part.  Right click on the original web part and choose web part properties.  click the + at layouts and tick hidden and then OK.

    Now you can edit your custom list form and save it.

    Note: It is a good idea to make a copy of the NewForm.aspx before you edit the original one.

    Cheers

    Brian

    • Yanıt Olarak İşaretleyen Alex Karaczun 24 Şubat 2012 Cuma 15:53
    24 Şubat 2012 Cuma 15:35

Tüm Yanıtlar

  • Hi Alex,

    Yes you can change the colour using a calculated column and some javascript.  In the link below you can get the javascript and add it to a CEWP under your list.  Then create a calculated column with the html code like below.

    ="<DIV style='color: red;'>"&Descripition&"</DIV>"

    Then just subsitute the calculated column for the description column in the view.

    Source:http://blog.pathtosharepoint.com/2008/09/01/using-calculated-columns-to-write-html/

    22 Şubat 2012 Çarşamba 15:02
  • I've done this with a web part before, but I don't think you are understanding what I am asking.  I am not asking to color a description text column, I am asking to color the description text of a column.  In other words I want to add color to the description field when creating a column under the Additional Column Settings heading.
    22 Şubat 2012 Çarşamba 15:19
  • Ahh my appologies.  I understand now.  But i'm afraid I don't know of an easy way to do this or if it is even possible.
    22 Şubat 2012 Çarşamba 16:09
  • Have you tried converting the LVWP to a DVWP with Designer and using conditional formatting to color the text?

    Imagine what we could be...if we could just imagine. | Daniel A. Galant | Sr. SharePoint Solutions Architect EPC Group.net

    23 Şubat 2012 Perşembe 00:11
  • Have you tried converting the LVWP to a DVWP with Designer and using conditional formatting to color the text?

    Imagine what we could be...if we could just imagine. | Daniel A. Galant | Sr. SharePoint Solutions Architect EPC Group.net


    Can you explain a little further?
    23 Şubat 2012 Perşembe 14:38
  • If you have access to SharePoint Designer, open your site in Designer. Navigate to the list you wish to modify. You should see a number of aspx pages for the various views defined for the list. As an example, if you open the allitems.aspx you will be modifying the page that is displayed when a user navigates to the list by default. (Assuming some other view has not been set as the default view.) The items are being displayed in a List View Web Part (LVWP) which has limited customization capabilities. With designer, you can right-click the web part and convert it to a Data View Web Part (DVWP) which will allow you to them customize the display of the data within the web part a great deal.

    Make sure there is an item in the list, so you have some data to select to apply your formatting to. (It's easier that way.) You can then select the field you want and apply conditional formatting to it to change the appearance of the text, cell background, border, etc.


    Imagine what we could be...if we could just imagine. | Daniel A. Galant | Sr. SharePoint Solutions Architect EPC Group.net

    23 Şubat 2012 Perşembe 16:23
  • If you have access to SharePoint Designer, open your site in Designer. Navigate to the list you wish to modify. You should see a number of aspx pages for the various views defined for the list. As an example, if you open the allitems.aspx you will be modifying the page that is displayed when a user navigates to the list by default. (Assuming some other view has not been set as the default view.) The items are being displayed in a List View Web Part (LVWP) which has limited customization capabilities. With designer, you can right-click the web part and convert it to a Data View Web Part (DVWP) which will allow you to them customize the display of the data within the web part a great deal.

    Make sure there is an item in the list, so you have some data to select to apply your formatting to. (It's easier that way.) You can then select the field you want and apply conditional formatting to it to change the appearance of the text, cell background, border, etc.


    Imagine what we could be...if we could just imagine. | Daniel A. Galant | Sr. SharePoint Solutions Architect EPC Group.net

    Ok.  I don't get the option you describe to convert.  Is this perhaps because I want to alter a form view, not a list view?
    23 Şubat 2012 Perşembe 16:47
  • Hi Alex,

    If it is only one place then just use jQuery and apply color to column description in a list. If not, design InfoPath form for inputing details in to List which should solve your problem. If you need any help please reply.


    Anand Thurubatla, AT&T Hosting & Application Services

    24 Şubat 2012 Cuma 13:04
  • I taught I would give this a go myself and it works great!  Thanks Dan.

    Alex, if you open your form library view in designer and right click on the list web part and choose 'Convert to XSLT Data View'.  Then all fields in the data view can be customized.  In my test I just clicked on one of my column descriptions and then added some styles to the table header it was contained in.  Then saved it.

    Also I found you can apply some conditional formatting to the column description based on the values in the list.

    Hope that helps

    Brian



    • Düzenleyen bmcomp 24 Şubat 2012 Cuma 14:22 Conditional formatting
    24 Şubat 2012 Cuma 14:12
  • I taught I would give this a go myself and it works great!  Thanks Dan.

    Alex, if you open your form library view in designer and right click on the list web part and choose 'Convert to XSLT Data View'.  Then all fields in the data view can be customized.  In my test I just clicked on one of my column descriptions and then added some styles to the table header it was contained in.  Then saved it.

    Hope that helps

    Brian


    I am not sure if I am misunderstanding something, but I drill down to Lists\Absences and double-click NewForm.aspx. When it loads in Design view I can select where it says, [Preview of List Form Web Part] to highlight the web part, but when I right-click I do not see an option that says, Convert to XSLT Data View.  It isn't there.
    24 Şubat 2012 Cuma 14:24
  • Perhaps this will help.

    24 Şubat 2012 Cuma 14:35
  • Ahhh!  We all taught you were trying to edit an actual list view!

    You can edit that no problem.  You will just need to hide the current webpart (preview of List form web part) and insert a custom list form.

    The handiest way to do this is to click on the current web part and then click the right arrow.  This will deselect the web part and leave the cursor in the correct position right after the web part.

    Next, click on Insert > Sharepoint Controls > Custom List Form...

    Under list or document library to use for form: choose your current library.  Then choose the content type if different from the normal Item.

    Now you need to hide the original web part.  Right click on the original web part and choose web part properties.  click the + at layouts and tick hidden and then OK.

    Now you can edit your custom list form and save it.

    Note: It is a good idea to make a copy of the NewForm.aspx before you edit the original one.

    Cheers

    Brian

    • Yanıt Olarak İşaretleyen Alex Karaczun 24 Şubat 2012 Cuma 15:53
    24 Şubat 2012 Cuma 15:35
  • Please let me know if you have found an answer. I'm in the same situation now as you were then. Any and all your help is greatly appreciated.

    -Ronick

    18 Eylül 2012 Salı 14:51
  • Ronick,

    My comment above is marked as the answer.  If this does not solve your problem them maybe your issue isn't the same or you need to give more detail.  Better still you might be better posting your own question rather than replying to an old (answered) post.

    18 Eylül 2012 Salı 15:07
  • I too had this same situation and solved the issue by conditional formating the description text using sharepoint Designer.

    • Open the custom Add/Edit Forms.
    • Select the Field description from the design view .
    • Select conditional formatting>Format column
    • choose Set as style and select the desired font color. 

    Hope it is Helpful.

    11 Temmuz 2013 Perşembe 09:48