John Liu .NET

View Original

SPD 2010 conditional formatting to hide columns based on a related column in the list

I was discussing hiding columns using SharePoint Designer 2010 and thought I'd dig into the UI a bit more to see if there are any special tricks, as well as how it works with inline editing.

Here are the steps.

 

Set up ConditionalList

  1. Create a list with "MyCondition" - checked box
  2. MyExtraInfo - text

When adding a new item, we have:

image

 

Drop into SPD - modify AllItems.aspx

 

image

 

If your list is currently empty and you don't have any rows right now, show some sample rows, so you can add conditional formatting to the data.

image

 

Select the field, then create a conditional formatting on that field.

image

 

Set the condition

image

OK, then save everything.

 

Go back to the list

image

 

The field is now hidden.

 

Inline editing

 

Enable inline editing in SPD

image

 

Check my condition, and click save (floppy disk)

image

 

Field is hidden again.

image

 

Sorry for confusing "Bakai", hope this helps.