-/**
- * Namespace: System.Web.UI.WebControls
- * Class: BoundColumn
- *
- * Author: Gaurav Vaish
- * Maintainer: gvaish@iitk.ac.in
- * Contact: <my_scripts2001@yahoo.com>, <gvaish@iitk.ac.in>
- * Implementation: yes
- * Status: 60%
- *
- * (C) Gaurav Vaish (2001)
- */
+//
+// System.Web.UI.WebControls.BoundColumn.cs
+//
+// Authors:
+// Gaurav Vaish (gvaish@iitk.ac.in)
+// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
+//
+// (C) Gaurav Vaish (2002)
+// (C) 2003 Andreas Nahr
+//\r
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
using System;
using System.ComponentModel;
{
public static readonly string thisExpr = "!";
- private bool boundFieldDesciptionValid;
+ private bool boundFieldDescriptionValid;
private string boundField;
private string formatting;
desc = null;
boundField = DataField;
formatting = DataFormatString;
- boundFieldDesciptionValid = false;
+ boundFieldDescriptionValid = false;
}
public override void InitializeCell(TableCell cell, int columnIndex, ListItemType itemType)
: if(!ReadOnly)
{
TextBox box = new TextBox();
- toAdd = box;
- if(DataField.Length != 0)
- bindCtrl = box;
- }
+ toAdd = box;
+ if(DataField.Length != 0)
+ bindCtrl = box;
+ } else
+ goto case ListItemType.SelectedItem;
+
break;
}
if(toAdd != null)
DataGridItem item = (DataGridItem)senderCtrl.NamingContainer;
object data = item.DataItem;
- if(!boundFieldDesciptionValid)
+ if(!boundFieldDescriptionValid)
{
if(boundField != BoundColumn.thisExpr)
{
HttpRuntime.FormatResourceString("File_Not_Found",
boundField));
}
- boundFieldDesciptionValid = true;
+ boundFieldDescriptionValid = true;
}
}
object value = data;
}
}
+ [DefaultValue (""), WebCategory ("Misc")]
+ [WebSysDescription ("The field that this column is bound to.")]
public virtual string DataField
{
get
}
}
+ [DefaultValue (""), WebCategory ("Misc")]
+ [WebSysDescription ("A format string that is applied to the data value.")]
public virtual string DataFormatString
{
get
}
}
+ [DefaultValue (false), WebCategory ("Misc")]
+ [WebSysDescription ("Determines if the databound field can only be displayed or also edited.")]
public virtual bool ReadOnly
{
get