* DataList.cs: copied and adapted PrepareControlHierarchy from DataGrid.
Now the items get the attributes from the styles in datalist. Add the
separators after each item, not before. GetItemStyle returns the actual
item style, not the styles in the datalist. Fixes bug #76384 and all
new tests pass.
svn path=/trunk/mcs/; revision=51506
* FontInfo.cs: Gendarme strikes again. Sealed class have no need for
inheritance demands.
* FontUnit.cs: Structs are sealed so there's no need for inheritance
demands.
* Unit.cs: Structs are sealed so there's no need for inheritance
demands.
svn path=/trunk/mcs/; revision=51358
* DataGrid.cs: change the ListItemType for the item selected, set
SelectedIndex before calling OnSelectedIndexChanged and set the selected
item type correctly when creating the columns. Fixes bug #76334.
* ButtonColumn.cs:
* EditCommandColumn.cs: use a ForeColorLinkbutton, otherwise when
selecting the row, the button keep the regular link color.
* DataGridColumn.cs: made the class internal.
svn path=/trunk/mcs/; revision=51320
* Calendar.cs: remove Console.
* ListBox.cs: the name is the UniqueID, not the ClientID.
* WebControl.cs: Attributes is case insensitive.
svn path=/trunk/mcs/; revision=51148
* ImageButton.cs: use UniqueID in LoadPostData and also try just the
UniqueID without appending a ".x" or ".y". Fixes several issues in
mojoPortal. Thanks to Joe Audetter for his patience.
svn path=/trunk/mcs/; revision=51145
* FontInfo.cs: removed useless ctor.
* Style.cs: keep here some commented out debugging code.
* DataGrid.cs: the Items property does not create a new arraylist if
the items_list was already initialized. Add case for Separator.
* DataGridColumn.cs: when sorting is enabled, the linkbutton rendered
in the header columns has a special ForeColor handling.
svn path=/trunk/mcs/; revision=51095
* DataGrid.cs: PageCount must persist in ViewState too and returns the
number of pages in the paged data source once we set that. Fix checks
for visibility of the pager: no more 2 pagers when custom paging is
enabled.
svn path=/trunk/mcs/; revision=51084
* ImageButton.cs: fix a bug reported on the list. We were triggering the
command event on every POST. And the 'name' attribute was not being
rendered, so the 'x,y' coordinates didn't have 'uniqueid.' prepended
and we couldn't find the values.
svn path=/trunk/mcs/; revision=51063
* DataGrid.cs: when paging is enable, the actual number of items is not
the number of items rendered before the postback, but that number times
the number of pages. Now we store the page count in the viewstate. Also,
as the number might be big, don't allocate an array of objects to fake
the collection for the PagedDataSource, but use the new NCollection
class instead, which provides cheap (memory wise) enumerator for an
arbitrary number of items. Thanks to "Adriano" for the test case.
svn path=/trunk/mcs/; revision=51027
* System.Web.UI/DesignerDataBoundLiteralControl.cs: changed autoid api.
* System.Web.UI/DataBoundLiteralControl.cs: changed autoid api.
* System.Web.UI/Control.cs: fixlet for UniqueID and weird test case.
Removed PreventAutoID and only use the property to set that value.
* System.Web.UI/LiteralControl.cs: changed autoid api.
* System.Web.UI.WebControls/Button.cs: implemented 2.0
RaisePostBackEvent in terms of the existing code in 1.1 (or viceversa).
RenderContents() does nothing.
* System.Web.UI.WebControls/DataGrid.cs: changed autoid api.
* System.Web.UI.WebControls/EditCommandColumn.cs: only 'Update' causes
validation.
* System.Web.UI.WebControls/TableCell.cs: changed autoid api.
RenderContents checks the number of controls to decide what to do, not
the value of Text in the viewstate.
* System.Web.UI.WebControls/TableRow.cs: changed autoid api.
* System.Web.UI.WebControls/BoundColumn.cs: SelectedItem was missing
when attaching a DataBind event. When we get an EditItem, we need a
TextBox to be created and this one will be the one that gets the event.
Changed ItemDataBinding to deal with a TextBox too.
All tests pass now in the default profile (2 not run).
svn path=/trunk/mcs/; revision=51019
* PagedDataSource.cs: fix IsLastPage. All tests pass.
* DataGrid.cs: InitializePager always add a cell and it's brand new. No
need to keep the old one in a field. Now all tests pass here too.
svn path=/trunk/mcs/; revision=50983
* PagedDataSource.cs: don't use the properties when they just return a
field. Fixed Count when paging is enabled. In GetEnumerator, IList goes
before ICollection (otherwise, an IList will always fall under the
ICollection case). The enumerator for lists will be empty if 'start'
is beyond the list size. All existing tests pass, but one in
DataGridTest that fails because of some problem with the paging.
svn path=/trunk/mcs/; revision=50972
* System.Web_test.dll.sources: add new test.
* System.Web.UI/AttributeCollection.cs: avoid code duplication and
don't add "style" to the bag, or it will overwrite the settings made
by CssStyleCollection.
* System.Web.UI/CssStyleCollection.cs: make it throw where MS throws.
Minimize the number of times we create the "style" string and take
care of updating it for the AttributeCollection. FillStyle and
BagToString are now private. One should use the 2.0 (internal in <2.0)
Value property.
* System.Web.UI.WebControls/Style.cs: avoid unnecesary creation of a
CssStyleCollection and instead write the style attributes directly to
the HtmlTextWriter.
* System.Web.UI.WebControls/CheckBox.cs: adapted to new API.
* DataGrid.cs: handle null data sources. Fixed the contions that make
the table to be added to the Controls collection.
* System.Web.UI.WebControls/Calendar.cs: the table needed an ID and the
attributes from the parent. Also don't create the ControlStyleCollection
if it has not already been created.
svn path=/trunk/mcs/; revision=50931
* DataGrid.cs: fix another test. The ID of the table generated by the
datagrid is set to the one on the datagrid if no one set the ID for the
table.
svn path=/trunk/mcs/; revision=50831
* FontUnit.cs: use a table for FontSize names, as the X{1,2}.* ones are
converted to string as X{1,2}-.*. All FontUnitTests pass now.
* Unit.cs: throw a format exception when there's not number or minus
sign in the first non-whitespace character.
svn path=/trunk/mcs/; revision=50821
* ListControl.cs: SelectedIndex/SelectedValue can be set before
DataBinding () is called on the control, so we have to keep this values
around and use them after the data is read. If both properties are
used, they must refer to the same item.
svn path=/trunk/mcs/; revision=50814
* DataList.cs: fill in the data keys from BaseDataList so that the
events can see them. Only assign DataItem when using data binding and
nullify it after all events are raised. Thanks to Joe Audette for quick
updates on this.
svn path=/trunk/mcs/; revision=50695
* Button.cs: For 2.0 don't add the "name" attribute unless there's an
id.
* DataGrid.cs: Fix TagKey (table) for 2.0.
* DataList.cs: Revert 2.0 specific stuff that was changed in RC.
* DropDownList.cs: For 2.0 don't add the "name" attribute unless
there's an id.
* ListBox.cs: For 2.0 don't add the "name" attribute unless there's an
id.
* RoleGroupCollection.cs: Fix "extra" exception in Remove method.
* Style.cs: Fixed (2.0) RegisteredCssClass to returns String.Empty
(i.e. not null).
* TextBox.cs: For 2.0 don't add the "name" attribute unless there's an
id.
* TreeView.cs: Added declarative security (Link and Inheritance
demands) for Minimal.
* XmlDataSource.cs: Added declarative security (Link and Inheritance
demands) for Minimal.
svn path=/trunk/mcs/; revision=50583
2005-09-22 Miguel de Icaza <[email protected]>
* DataBindingCollection.cs: Raise the event, remove MonoTODO.
* MinimizableAttributeTypeConverter.cs: Fix warning, compare to a
string.
svn path=/trunk/mcs/; revision=50544
* BaseDataList.cs: it's the DataKeysArray what is stored in "DataKeys",
not the DataKeys.
* DataGrid.cs: add the keys to BaseDataList.DataKeysArray. When using
a data source, first try reflection, then componentmodel. If we get
an enumerator, keep it around, as MS only calls GetEnumerator once.
Throw an exception if no columns can be created from the given data
source. Tested with DbDataRecord, DataTable, ArrayList and
ICustomTypeDescriptor.
svn path=/trunk/mcs/; revision=50335
* AccessDataSource.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [ToolboxBitmap] on class.
* AdRotator.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Removed extra Page and ViewState properties.
* BulletedList.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* Button.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Added [SupportsEventValidation] on class (2.0).
* Calendar.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* CheckBox.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* CompositeControl.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added new protected RecreateChildControls method.
* DataControlCommands.cs: Added declarative security (LinkDemands) for
Minimal. Added private ctor.
* DataGrid.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Fixed properties for 2.0 (mostly removing
[Bindable]). Added override for TagKey property.
* DataGridColumn.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [UrlProperty] on HeaderImageUrl (2.0).
* DataGridItem.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added IDataItemContainer interface for 2.0.
* DataGridPagerStyle.cs: Added declarative security (LinkDemands) for
Minimal. Remove [Bindable] from 2.0 and add [Localizable].
* DataList.cs: Removed [Load|Save]ControlState methods.
* DropDownList.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* EditCommandColumn.cs: Added declarative security (Link and
Inheritance demands) for Minimal. Added missing attributes,
[DefaultValue] and [Localize] for 2.0.
* FontInfo.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Remove [Bindable] and added [RefreshProperties]
for 2.0.
* Login.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Fixed IsStyleEmpty. Removed extra [Themeable] attributes.
* ImageButton.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* LinkButton.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* ListBox.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Added [SupportsEventValidation] on class (2.0).
* Literal.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Removed [EditorBrowsable] on CreateControlCollection method.
* LoginStatus.cs: Added missing [Themeable] attributes on properties.
* MenuItemStyle.cs: Changed IsEmpty to public (required to compile -
but will be shown as extra).
* RadioButton.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* RadioButtonList.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added [SupportsEventValidation] on class (2.0).
* RangeValidator.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Added missing [Themeable] attributes.
* RegularExpressionValidator.cs: Added declarative security (Link and
Inheritance demands) for Minimal. Remove [Bindable] from 2.0 and add
[Localizable].
* RoleGroupCollection.cs: Added declarative security (Link and
Inheritance demands) for Minimal. Fixed base class (changed in RC).
Re-implemented CopyTo. Removed some methods.
* Style.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Remove static IsStyleEmpty and ToString (from 2.0). IsEmpty
is now public in 2.0.
* Table.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Added [SupportsEventValidation] on class (2.0).
* TableCell.cs: Fixed PersistenceMode for 2.0.
* TextBox.cs: Added declarative security (Link and Inheritance demands)
for Minimal. Added [SupportsEventValidation] on class (2.0).
* TreeNodeStyle.cs: Changed IsEmpty to public (required to compile -
but will be shown as extra).
* WebControl.cs: Added declarative security (Link and Inheritance
demands) for Minimal. Removed [EditorBrowsable] on ControlStyleCreated
property.
svn path=/trunk/mcs/; revision=50329
* TableStyle.cs: fixed typo that prevented restoring GridLines from
a saved viewstate.
* DataGrid.cs: the table does not get an auto ID. When restoring from
viewstate, use all the saved columns, not just that data bound ones. Set
the owner of the BoundColumns created. Save/restore columns.
OnItemCreated happens after the item is initialized and the data item is
set before the event and nullified after OnItemDataBound.
Add the render_table to the Controls immediately, otherwise we might get
errors from child controls such as "must be rendered inside a form".
Keep the items created in the list waiting for them.
The table uses the attributes from the DataGrid and ControlStyle.
Raise OnItemCommand on all bubble events and don't propagate bubble
event up in the hierarchy
* TableCell.cs: it does not get an automatic ID.
* BoundColumn.cs: FormatDataValue returns an empty string on null input
(there was already a test for this).
Fixes bug #76117.
svn path=/trunk/mcs/; revision=50218
* DataGrid.cs: merge column styles too. Fixes bug #76106.
* DataGridColumn.cs: new internal method to retrieve the styles without
creating an instance for them.
svn path=/trunk/mcs/; revision=50109
* Style.cs: corcompare stuff.
* RequiredFieldValidator.cs: more corcompare stuff.
* CheckBoxList.cs: clean up some of the interface methods vs
protected virtual 2.0 calls.
* SubMenuStyle.cs: corcompare says this should implement
ICustomTypeDescriptor... sooo, make it.
svn path=/trunk/mcs/; revision=49984
* TableCell.cs: do the same as HyperLink and others in
AddParsedSubobject so that adding a literal control does not remove the
existing controls if any. Fixes bug #76078.
svn path=/trunk/mcs/; revision=49980