Fixing GroupBy List Views in SharePoint 2010 with SharePoint Designer

You may run into a problem with getting your list views to work in SharePoint 2010 if you keep your old 2007 look and feel.  Their are several articles out there that show you how to fix it programmatically, but not as an end user.

The problem is with list views that have a "Group by" added and the default XML in the CAML query is set to "TRUE" for the Collapsed attribute.  Here are the steps to fix this:

  1. You can open the view page you created for the list in SharePoint designer
  2. Do a search for "GroupBy" in the page ASP.NET code.
  3. Set the Collapse property to "FALSE"
  4. Add the following Javascript to the page to "Click" the links to collapse the elements:

<script language="javascript" type="text/javascript">               

ExpLinkFormer = function()
{
this._init();
}

ExpLinkFormer.prototype = {
_init: function() {

var links = document.links;

for (var i = 0; i < links.length; i++) {          
if (links[i].href == "javascript:" && links[i].onclick.toString().indexOf("ExpCollGroup") > -1) {
links[i].click();
}
}
}
}   
      
var expLnk = new ExpLinkFormer();
   
</script>

  • Save the page – problem solved!
  • Repeat for all the views that have the problem

Enjoy!

Chris

SQL Azure supported tables/views

Here is a complete list of supported tablesviews in SQL Azure (11.0.1814.30):

sys.all_columns;
sys.all_objects;
sys.all_parameters;
sys.all_sql_modules;
sys.all_views;
sys.assemblies;
sys.assembly_types;
sys.CHECK_CONSTRAINTS;
sys.column_type_usages;
sys.columns;
sys.COLUMNS;
sys.computed_columns;
sys.database_permissions;
sys.database_role_members;
sys.databases;
sys.default_constraints;
sys.dm_exec_requests;
sys.dm_exec_sessions;
sys.dm_tran_active_transactions;
sys.dm_tran_database_transactions;
sys.dm_tran_locks;
sys.dm_tran_session_transactions;
sys.event_notification_event_types;
sys.event_notifications;
sys.events;
sys.foreign_key_columns;
sys.foreign_keys;
sys.identity_columns;
sys.index_columns;
sys.indexes;
sys.key_constraints;
sys.numbered_procedure_parameters;
sys.numbered_procedures;
sys.objects;
sys.parameters;
sys.plan_guides;
sys.procedures;
sys.schemas;
sys.spatial_index_tessellations;
sys.spatial_indexes;
sys.spatial_reference_systems;
sys.sql_expression_dependencies;
sys.sql_logins;
sys.sql_modules;
sys.stats;
sys.stats_columns;
sys.synonyms;
sys.syscharsets;
sys.syscolumns;
sys.syscursorrefs;
sys.syscursors;
sys.sysdatabases;
sys.syslanguages;
sys.sysobjects;
sys.sysreferences;
sys.system_columns;
sys.system_objects;
sys.system_parameters;
sys.system_sql_modules;
sys.system_views;
sys.systypes;
sys.sysusers;
sys.table_types;
sys.tables;
sys.trigger_event_types;
sys.trigger_events;
sys.triggers;
sys.types;
sys.views;

Unsupported tables:

sys.allocation_units;
sys.assembly_modules;
sys.assembly_references;
sys.asymmetric_keys;
sys.backup_devices;
sys.certificates;
sys.change_tracking_databases;
sys.change_tracking_tables;
sys.COLUMN_DOMAIN_USAGE;
sys.COLUMN_PRIVILEGES;
sys.column_xml_schema_collection_usages;
sys.configurations;
sys.CONSTRAINT_COLUMN_USAGE;
sys.CONSTRAINT_TABLE_USAGE;
sys.conversation_endpoints;
sys.conversation_groups;
sys.conversation_priorities;
sys.credentials;
sys.crypt_properties;
sys.cryptographic_providers;
sys.data_spaces;
sys.database_audit_specification_details;
sys.database_audit_specifications;
sys.database_files;
sys.database_mirroring;
sys.database_mirroring_endpoints;
sys.database_mirroring_witnesses;
sys.database_principal_aliases;
sys.database_principals;
sys.database_recovery_status;
sys.destination_data_spaces;
sys.dm_audit_actions;
sys.dm_audit_class_type_map;
sys.dm_broker_activated_tasks;
sys.dm_broker_connections;
sys.dm_broker_forwarded_messages;
sys.dm_broker_queue_monitors;
sys.dm_cdc_errors;
sys.dm_cdc_log_scan_sessions;
sys.dm_clr_appdomains;
sys.dm_clr_loaded_assemblies;
sys.dm_clr_properties;
sys.dm_clr_tasks;
sys.dm_cryptographic_provider_properties;
sys.dm_database_encryption_keys;
sys.dm_db_file_space_usage;
sys.dm_db_index_usage_stats;
sys.dm_db_mirroring_auto_page_repair;
sys.dm_db_mirroring_connections;
sys.dm_db_mirroring_past_actions;
sys.dm_db_missing_index_details;
sys.dm_db_missing_index_group_stats;
sys.dm_db_missing_index_groups;
sys.dm_db_partition_stats;
sys.dm_db_persisted_sku_features;
sys.dm_db_script_level;
sys.dm_db_session_space_usage;
sys.dm_db_task_space_usage;
sys.dm_exec_background_job_queue;
sys.dm_exec_background_job_queue_stats;
sys.dm_exec_cached_plans;
sys.dm_exec_connections;
sys.dm_exec_procedure_stats;
sys.dm_exec_query_memory_grants;
sys.dm_exec_query_optimizer_info;
sys.dm_exec_query_resource_semaphores;
sys.dm_exec_query_stats;
sys.dm_exec_query_transformation_stats;
sys.dm_exec_trigger_stats;
sys.dm_filestream_file_io_handles;
sys.dm_filestream_file_io_requests;
sys.dm_fts_active_catalogs;
sys.dm_fts_fdhosts;
sys.dm_fts_index_population;
sys.dm_fts_memory_buffers;
sys.dm_fts_memory_pools;
sys.dm_fts_outstanding_batches;
sys.dm_fts_population_ranges;
sys.dm_io_backup_tapes;
sys.dm_io_cluster_shared_drives;
sys.dm_io_pending_io_requests;
sys.dm_os_buffer_descriptors;
sys.dm_os_child_instances;
sys.dm_os_cluster_nodes;
sys.dm_os_dispatcher_pools;
sys.dm_os_dispatchers;
sys.dm_os_hosts;
sys.dm_os_latch_stats;
sys.dm_os_loaded_modules;
sys.dm_os_memory_allocations;
sys.dm_os_memory_brokers;
sys.dm_os_memory_cache_clock_hands;
sys.dm_os_memory_cache_counters;
sys.dm_os_memory_cache_entries;
sys.dm_os_memory_cache_hash_tables;
sys.dm_os_memory_clerks;
sys.dm_os_memory_node_access_stats;
sys.dm_os_memory_nodes;
sys.dm_os_memory_objects;
sys.dm_os_memory_pools;
sys.dm_os_nodes;
sys.dm_os_performance_counters;
sys.dm_os_process_memory;
sys.dm_os_ring_buffers;
sys.dm_os_schedulers;
sys.dm_os_spinlock_stats;
sys.dm_os_stacks;
sys.dm_os_sublatches;
sys.dm_os_sys_info;
sys.dm_os_sys_memory;
sys.dm_os_tasks;
sys.dm_os_threads;
sys.dm_os_virtual_address_dump;
sys.dm_os_wait_stats;
sys.dm_os_waiting_tasks;
sys.dm_os_worker_local_storage;
sys.dm_os_workers;
sys.dm_qn_subscriptions;
sys.dm_repl_articles;
sys.dm_repl_schemas;
sys.dm_repl_tranhash;
sys.dm_repl_traninfo;
sys.dm_resource_governor_configuration;
sys.dm_resource_governor_resource_pools;
sys.dm_resource_governor_workload_groups;
sys.dm_server_audit_status;
sys.dm_tran_active_snapshot_database_transactions;
sys.dm_tran_commit_table;
sys.dm_tran_current_snapshot;
sys.dm_tran_current_transaction;
sys.dm_tran_top_version_generators;
sys.dm_tran_transactions_snapshot;
sys.dm_tran_version_store;
sys.dm_xe_map_values;
sys.dm_xe_object_columns;
sys.dm_xe_objects;
sys.dm_xe_packages;
sys.dm_xe_session_event_actions;
sys.dm_xe_session_events;
sys.dm_xe_session_object_columns;
sys.dm_xe_session_targets;
sys.dm_xe_sessions;
sys.DOMAIN_CONSTRAINTS;
sys.DOMAINS;
sys.endpoint_webmethods;
sys.endpoints;
sys.extended_procedures;
sys.extended_properties;
sys.filegroups;
sys.fulltext_catalogs;
sys.fulltext_document_types;
sys.fulltext_index_catalog_usages;
sys.fulltext_index_columns;
sys.fulltext_index_fragments;
sys.fulltext_indexes;
sys.fulltext_languages;
sys.fulltext_stoplists;
sys.fulltext_stopwords;
sys.fulltext_system_stopwords;
sys.function_order_columns;
sys.http_endpoints;
sys.internal_tables;
sys.KEY_COLUMN_USAGE;
sys.key_encryptions;
sys.linked_logins;
sys.login_token;
sys.master_files;
sys.master_key_passwords;
sys.message_type_xml_schema_collection_usages;
sys.messages;
sys.module_assembly_usages;
sys.openkeys;
sys.parameter_type_usages;
sys.parameter_xml_schema_collection_usages;
sys.partition_functions;
sys.partition_parameters;
sys.partition_range_values;
sys.partition_schemes;
sys.partitions;
sys.REFERENTIAL_CONSTRAINTS;
sys.remote_logins;
sys.remote_service_bindings;
sys.resource_governor_configuration;
sys.resource_governor_resource_pools;
sys.resource_governor_workload_groups;
sys.routes;
sys.ROUTINE_COLUMNS;
sys.ROUTINES;
sys.SCHEMATA;
sys.securable_classes;
sys.server_assembly_modules;
sys.server_audit_specification_details;
sys.server_audit_specifications;
sys.server_audits;
sys.server_event_notifications;
sys.server_event_session_actions;
sys.server_event_session_events;
sys.server_event_session_fields;
sys.server_event_session_targets;
sys.server_event_sessions;
sys.server_events;
sys.server_file_audits;
sys.server_permissions;
sys.server_principal_credentials;
sys.server_principals;
sys.server_role_members;
sys.server_sql_modules;
sys.server_trigger_events;
sys.server_triggers;
sys.servers;
sys.service_broker_endpoints;
sys.service_contract_message_usages;
sys.service_contract_usages;
sys.service_contracts;
sys.service_message_types;
sys.service_queue_usages;
sys.service_queues;
sys.services;
sys.soap_endpoints;
sys.sql_dependencies;
sys.symmetric_keys;
sys.sysaltfiles;
sys.syscacheobjects;
sys.syscomments;
sys.sysconfigures;
sys.sysconstraints;
sys.syscurconfigs;
sys.syscursorcolumns;
sys.syscursortables;
sys.sysdepends;
sys.sysdevices;
sys.sysfilegroups;
sys.sysfiles;
sys.sysforeignkeys;
sys.sysfulltextcatalogs;
sys.sysindexes;
sys.sysindexkeys;
sys.syslockinfo;
sys.syslogins;
sys.sysmembers;
sys.sysmessages;
sys.sysoledbusers;
sys.sysopentapes;
sys.sysperfinfo;
sys.syspermissions;
sys.sysprocesses;
sys.sysprotects;
sys.sysremotelogins;
sys.sysservers;
sys.system_components_surface_area_configuration;
sys.system_internals_allocation_units;
sys.system_internals_partition_columns;
sys.system_internals_partitions;
sys.TABLE_CONSTRAINTS;
sys.TABLE_PRIVILEGES;
sys.tcp_endpoints;
sys.trace_categories;
sys.trace_columns;
sys.trace_event_bindings;
sys.trace_events;
sys.trace_subclass_values;
sys.traces;
sys.transmission_queue;
sys.type_assembly_usages;
sys.user_token;
sys.via_endpoints;
sys.VIEW_COLUMN_USAGE;
sys.VIEW_TABLE_USAGE;
sys.xml_indexes;
sys.xml_schema_attributes;
sys.xml_schema_collections;
sys.xml_schema_component_placements;
sys.xml_schema_components;
sys.xml_schema_elements;
sys.xml_schema_facets;
sys.xml_schema_model_groups;
sys.xml_schema_namespaces;
sys.xml_schema_types;
sys.xml_schema_wildcard_namespaces;
sys.xml_schema_wildcards;