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
* ListItem.cs: throw in AddParsedSubObject if the object is not a
LiteralControl.
* RadioButtonList.cs: implemented LoadPostData and
RaisePostDataChangedEvent.
svn path=/trunk/mcs/; revision=49841
* FontInfo.cs (IsEmpty): new internal property, used by
Style.IsEmpty.
* Style.cs (IsEmpty): make sure the fontinfo is null or empty as
well.
svn path=/trunk/mcs/; revision=49824
* Calendar.cs (WriteDay): always add BackColor=Silver,
ForeColor=White to selected day cells, before copying over the
selectedDayStyle, if it exists.
(WriteDays): fix nunit test - if the first day of the month falls
on the first day of the week, go back one week (effectively adding
a row of dates from the previous month.)
(WriteTitle): don't copy the control style to the tableTitle,
since it might have height specifications, which would make the
title look rather off.
svn path=/trunk/mcs/; revision=49672
* ValidationSummary.cs (AddAttributesToRender): we only set
display=none if there are no errors.
* BaseValidator.cs (OnPreRender): fix a JS error - on submit we
call ValidatorOnSubmit, not ValidatorCommonOnSubmit.
svn path=/trunk/mcs/; revision=49658
* ListControl.cs (SelectedIndex): add comment about how you'd
think OnSelectedIndexChanged would be called.. and you'd be wrong.
(Text): implement in terms of SelectedValue.
(TagKey): do the HAVE_CONTROL_ADAPTERS two-step.
(LoadControlState): implement - this is where the selected index
ArrayList gets stuffed in 2.0.
(OnInit): call Page.RegisterRequiresControlState.
(OnTextChanged): implement.
(RenderContents): for now just chain up to base.RenderContents.
(SaveControlState): save our control state properly.
(GetSelectedIndices): split this out from SaveViewState to it can
be used by both that and SaveControlState.
(SaveViewState): mangle this function so it works in both 2.0 and
1.0.
(LoadViewState): same.
svn path=/trunk/mcs/; revision=49612
* ValidationSummary.cs (Render): only do the JS stuff when the
validators on the page are uplevel.
* BaseValidator.cs (Render): remove unnecessary comment.
svn path=/trunk/mcs/; revision=49557
* Various places: make sure that the DefaultValue matches the
type. Thanks to Michael for pointing this out.
In future audits, you might want to use the following awk command:
awk '/DefaultValue/ { v=$0; looking = 1; } /public/ && looking &&
!/string/ && !/ int / && !/ bool / { print FILENAME; print v;
print $0; looking = 0; } /public/ && looking { looking = 0; } '
*.cs
The above skips bools, strings and ints as those were fine as we
set them. The bug was on the other ones.
svn path=/trunk/mcs/; revision=49274
* Repeater.cs: lots of 2.0 work, much of it c&p'ed from
{Base}DataList, and also from debug spew garnered from some
Repeater subclass tests on MS.
(CreateControlHierarchy): in 2.0 if IsBonudUsingDataSourceID get
the IEnumerable by calling GetData().
(DataBind): reset RequiresDataBinding to false (2.0).
(DataMember): copy the set implementation from DataList, and add
2.0 code to call OnDataPropertyChanged if we're !Initialiezd.
(DataSource): more c&p.
(DataSourceID); implement (2.0)
(Initialized): implement (2.0)
(IsBoundUsingDataSource): implement (2.0)
(RequiresDataBinding): implement (2.0)
(SelectArguments): implement (2.0)
(CreateDataSourceSelectArguments): implement (2.0)
(EnsureDataBound): implement (2.0)
(GetData): implement.
(OnDataPropertyChanged): remove the NIE, but leave the MonoTODO
(2.0)
(OnDataSourceViewChanged): set RequiresDataBinding to true, but
leave the MonoTODO. (2.0)
(OnInit): call base.OnInit instead of throwing NIE, but leave the
MonoTODO (2.0)
(OnLoad): implement.
(OnPreRender): implement.
(ConnectToDataSource): new method - look for the right control.
svn path=/trunk/mcs/; revision=49234
* XmlDataSourceView.cs: fix the scope of our select. Don't use
call SelectNodes on the XmlDocument, not on
XmlDocument.DocumentElement.
svn path=/trunk/mcs/; revision=49231
* XmlDataSourceView.cs (.ctor): remove the nodelist parameter.
(DoXPathSelect): put the xpath selection stuff here.
(ExecuteSelect): call DoXPathSelect if we need to (if nodes ==
null).
* XmlDataSource.cs (IDataSource.GetView): don't do the XPath
select here, the view does it.
svn path=/trunk/mcs/; revision=49227