Article ID: 929253 - Last Review: December 28, 2006 - Revision: 1.1

The value of the first column is erased when you edit the value of the second column in Windows SharePoint Services 2.0

System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
Expand all | Collapse all

SYMPTOMS

When you edit the value of the second column of a list in Microsoft Windows SharePoint Services 2.0, the value of the first column is erased. This occurs if the following conditions are true:
  • The Windows SharePoint Services 2.0 list has two custom columns that contain values.
  • You use the datasheet view when you edit the value of the second column.
  • You programmatically set the ReadOnly property of the first column to True by using the Lists Web service.

WORKAROUND

To work around this issue, apply the following code to set the ReadOnly property to True:
localhost.Lists listService = new localhost.Lists();
	listService.Credentials= System.Net.CredentialCache.DefaultCredentials;
	XmlDocument xmlDoc = new System.Xml.XmlDocument();
	XmlNode ndUpdateFields = xmlDoc.CreateNode(XmlNodeType.Element, "Fields", "");
	ndUpdateFields.InnerXml = "<Method ID='1'>" +
	"<Field ReadOnly='True' ShowInEditForm = 'FALSE' Type='Number' Name='_x0043_ol1' DisplayName='Col1'/>" +
	"</Method>";
	try
	{
		XmlNode ndReturn = listService.UpdateList("Events", null, null, ndUpdateFields, null, null);
		MessageBox.Show(ndReturn.OuterXml);
	}
	catch (Exception ex)
	{
		MessageBox.Show("Message:\n" + ex.Message + "\nStackTrace:\n" + ex.StackTrace);
	}
Note Use the same case sensitivity in the XML fields. For example, use ReadOnly='True' instead of ReadOnly='TRUE'.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

APPLIES TO
  • Microsoft Windows SharePoint Services 2.0
Keywords: 
kbexpertiseinter kbtshoot kbprb KB929253