Ellipses and Rendering Limits
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Windows SharePoint Services displays an ellipsis in the mobile device viewer when the text length of a field exceeds a limit that is set in the mobile web.config file (located in Local_Drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\MOBILE). In mobile Edit forms for items containing large amounts of data, Windows SharePoint Services disables field editing per field type to avoid data loss when the contents exceed a specified limit. In both cases, mobile rendering limits determine what is displayed in the mobile device.
Figure 1. Text truncation and ellipsis rendering
You can modify the limits for text length, and change the behavior of mobile view or form rendering, by editing the web.config file in a text editor, or by using types and members of the Windows SharePoint Services object model.
Rendering limits define not only text length limits for ellipsis rendering used in mobile controls, but also the number of options displayed in the controls. For a list of the rendering limits and their default values, see the table at the end of this topic.
Each limit setting is represented as a key-and-value pair within the <appSettings> section of the web.config fileāfor example, <add key="mobile_webtitlelimit" value="20" />. If the configuration for a text length limitation is set to 0 or no entry is specified, ellipsis rendering does not work.
Note
When you modify the mobile web.config file, you must do so on each front-end Web server in a Windows SharePoint Services deployment.
Using the Object Model to Configure Limits
Rendering limits are determined in one of two ways:
Through default configuration settings that are set in the mobile web.config file.
Through the Properties property of the SPWeb class that can be configured per Web site through the object model.
Modifications you make to web.config are global to a front-end Web server, while changes you make through Web properties are scoped per Web site, which are not inherited by subsites.
To allow customization of rendering limits per Web site, Windows SharePoint Services first determines whether the property bag (the Properties property) of the SPWeb object stores the rendering limit parameter. If so, the value stored by the property bag specifies the rendering limit; otherwise, the value stored in web.config specifies the rendering limit. Property bag settings for a particular site override the global settings in web.config.
To change the rendering limit for a mobile control, add a property to the property bag (SPPropertyBag object in the Properties property. The following example shows how to change the rendering limit for list titles of a specific Web site to 15 characters.
SPWeb webSite = SPContext.Current.Site.AllWebs["WebSite"];
SPPropertyBag propBag = webSite.Properties;
propBag["mobile_listtitlelimit"] = "15";
propBag.Update();
The example requires using directives (Imports in Visual Basic) for the Microsoft.SharePoint and Microsoft.SharePoint.Utilities namespaces. In addition, you must insert a FormDigest control in the default.aspx page of the custom Web application.
Rendering Limits
The following table describes the rendering limit parameters used in mobile pages and shows their default maximum values. The unit of measure is character, regardless of half-width or full-width character.
Name |
Description |
Value |
---|---|---|
Base Rendering Limit |
|
|
mobile_basetextlengthlimit |
Base limit for text length |
255 |
System Rendering Limits |
|
|
mobile_enablelimitationondispform |
Flag for ellipsis rendering on Display form |
FALSE |
mobile_fieldnumberlimitforinputform |
Limit for the number of fields to show on New and Edit forms |
100 |
mobile_fieldtitlelimit |
Limit for the title of each field on forms |
20 |
mobile_itemtitlelimit |
Limit for the item title shown on forms |
20 |
mobile_listtitlelimit |
Limit for the List title on list views |
20 |
mobile_viewitemnumberlimit |
Limit for the number of items to show on list views |
100 |
mobile_viewnumberlimit |
Limit for the number of Views to show in the View drop down list |
10 |
mobile_viewtitlelimit |
Limit for the length of View names in the for View drop down selector |
20 |
mobile_webtitlelimit |
Limit for the length of the Web site title shown on the top page of the Web site |
20 |
Field Related Limits |
|
|
mobile_attachmentsfieldnumberlimit |
Limit for the number of attachments to show |
3 |
mobile_attachmentsfieldtextlimit |
Limit for the file name of an individual attachment |
20 |
mobile_calculatedfieldtextlimit |
Limit for field value length for Calculated field |
20 |
mobile_choicefieldoptionnumberlimit |
Limit for the number of options to show on the New and Edit forms for a Choice field |
10 |
mobile_choicefieldoptiontextlimit |
Limit for the name of any individual on the New and Edit forms for a Choice field |
20 |
mobile_fieldtextlimitforview |
Limit for the length of any individual field value on list views |
19 |
mobile_filefieldtextlimit |
Limit for the field value length for File fields |
20 |
mobile_lookupfieldoptionnumberlimit |
Limit for the number of options to show on the New and Edit forms for a Lookup field |
10 |
mobile_lookupfieldoptiontextlimit |
Limit for the name of any individual option on the New and Edit forms for a Lookup field |
20 |
mobile_multichoice_displaylimitforselectedchoices |
Limit for the number of selected choices, in a multi choice field, to show in list views and item Display forms |
10 |
mobile_multilinetextfieldtextlimit |
Limit for the field value length for text fields with multiple lines |
256 |
mobile_multilookup_displaylimitforselectedlookups |
Limit for the number of selected lookup values, in a multi value lookup field, to show in list views and item Display forms |
10 |
mobile_multiuser_displaylimitforselectedusers |
Limit for the number of selected users, in a multi user field, to show in list views and item Display forms |
100 |
mobile_singlelinetextfieldtextlimit |
Limit for the field value length for single line text fields |
256 |
mobile_urlfieldtextlimit |
Limit for the length of the text for a URL field (the URL itself is not shown and not truncated) |
20 |
mobile_userfieldoptionnumberlimit |
Limit for the number of options to show on New / Edit form for a user field |
100 |
mobile_userfieldoptiontextlimit |
Limit for the length of any individual option for a user field |
20 |