Olivier
|
|
Group: StrataFrame Users
Posts: 96,
Visits: 805
|
Thanks michel,
we must to log in , to accass on this link,
excuse me , it's ok.
============================================== Asp.net C# - Strataframe - telerik ==============================================
|
|
|
Michel Levy
|
|
Group: StrataFrame Users
Posts: 193,
Visits: 9K
|
clicking on the link takes me on the right page of the french forum. I'll send you the pdf by private mail.
|
|
|
Olivier
|
|
Group: StrataFrame Users
Posts: 96,
Visits: 805
|
Ok thanks Michel
but your topic 43 doesn't exist.
Olivier
============================================== Asp.net C# - Strataframe - telerik ==============================================
|
|
|
Michel Levy
|
|
Group: StrataFrame Users
Posts: 193,
Visits: 9K
|
Hello Olivier, I explain this piece of code (i.e. ToolboxData) in the contrib I wrote last year on the french speaking StrataFrame forum ( http://www.strataframe.fr/forum/Topic43.aspx). It is the code that will be generated on you aspx page when you'll drop this control from the ToolBox on the aspx page.
|
|
|
Olivier
|
|
Group: StrataFrame Users
Posts: 96,
Visits: 805
|
Thanks very much,
Can you explain me this ?
: [ToolboxData("<{0}:sfRadTextBox runat=server></{0}:sfRadTextBox>")]
And you SubClasses so DropDownlist or other controls ?
i will try to same thing for the dropdown.
thanks Olivier,
============================================== Asp.net C# - Strataframe - telerik ==============================================
|
|
|
Govinda Berrio
|
|
Group: StrataFrame Users
Posts: 94,
Visits: 481
|
Hi, here is how I subclassed the Telerik RadTextBox using the IWebBusinessBindable interface.
using System; using System.Collections.Generic; using System.ComponentModel; using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Telerik.Web.UI; using MicroFour.StrataFrame.Business; using MicroFour.StrataFrame.UI; using MicroFour.StrataFrame.UI.Web; using MicroFour.StrataFrame.Extensibility; namespace GKG.WebControls.StrataFrameTelerikWrapper { [ToolboxData("<{0}:sfRadTextBox runat=server></{0}:sfRadTextBox>")] public class sfRadTextBox : RadTextBox, IWebBusinessBindable { #region " Privates " private string _BindingField = ""; private string _BindingProperty = "Text"; private string _BindingFormat = ""; private string _BusinessObjectName = ""; private BindingDirections _BindingDirection = BindingDirections.TwoWay; private string _ErrorMessage = ""; private bool _InError = false; private bool _IgnoreManageUIReadOnlyState = false; #endregion #region " Public Properties " /// <summary> /// The field on the business object to which this control is bound /// </summary> /// <value></value> /// <remarks></remarks> [Category(BusinessMod.EDITOR_CATEGORY), DefaultValue(""), Description(BusinessMod.EDITOR_BINDINGFIELD_DESC), Editor(Constants.TE_WebBindingFieldTypeEditor, typeof(System.Drawing.Design.UITypeEditor))] public string BindingField { get { return _BindingField; } set { _BindingField = value; } } /// <summary> /// The property on the control that is bound to the data on the business object /// </summary> /// <value></value> /// <remarks></remarks> [Category(BusinessMod.EDITOR_CATEGORY), DefaultValue("Text"), Description(BusinessMod.EDITOR_BINDINGPROPERTY_DESC), Editor(Constants.TE_BindingPropertyEditor, typeof(System.Drawing.Design.UITypeEditor))] public string BindingProperty { get { return _BindingProperty; } set { _BindingProperty = value; } } /// <summary> /// The format to display the data when the data is bound to the control. /// </summary> /// <value></value> /// <remarks></remarks> [Description(BusinessMod.EDITOR_WEBBINDINGFORMAT_DESC), Category(BusinessMod.EDITOR_CATEGORY), DefaultValue("")] public string BindingFormat { get { return _BindingFormat; } set { _BindingFormat = value; } } /// <summary> /// The name of the business object on the page to which this control is bound /// </summary> /// <value></value> /// <remarks></remarks> [Category(BusinessMod.EDITOR_CATEGORY), DefaultValue(""), Description(BusinessMod.EDITOR_BUSINESSOBJECT_DESC), Editor(Constants.TE_BusinessObjectNameTypeEditor, typeof(System.Drawing.Design.UITypeEditor))] public string BusinessObjectName { get { return _BusinessObjectName; } set { _BusinessObjectName = value; } } /// <summary> /// Determines whether or not the control's state is automatically managed by the business object /// to which it is bound /// </summary> /// <value></value> /// <remarks></remarks> [Description(BusinessMod.EDITOR_IGNOREMANAGE_DESC), Category(BusinessMod.EDITOR_CATEGORY), DefaultValue(false)] public bool IgnoreManageUIReadOnlyState { get { return _IgnoreManageUIReadOnlyState; } set { _IgnoreManageUIReadOnlyState = value; } } /// <summary> /// Specified whether the data is bound from the control to the data, vice versa, or both. /// </summary> /// <value></value> /// <remarks></remarks> [Category(BusinessMod.EDITOR_CATEGORY), Description(BusinessMod.EDITOR_WEBBINDINGDIRECTION_DESC)] public BindingDirections BindingDirection { get { return _BindingDirection; } set { _BindingDirection = value; } } #endregion #region " Non-Browsable Properties " /// <summary> /// Determines if the control is editable by the user (wraps Control.Enabled) /// </summary> /// <value></value> /// <remarks></remarks> [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public bool BindingEditable { get { return this.Enabled; } set { this.Enabled = value; } } /// <summary> /// The error message that is displayed when the control is in error /// </summary> /// <value></value> /// <remarks></remarks> [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public string ErrorMessage { get { return _ErrorMessage; } set { _ErrorMessage = value; } } /// <summary> /// Determines if the control is in error and the error provider should be displayed /// </summary> /// <value></value> /// <remarks></remarks> [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public bool InError { get { return _InError; } set { _InError = value; } } /// <summary> /// Determines whether or not the control has bindings that are in addition to the primary data binding /// </summary> /// <value></value> /// <remarks></remarks> [Browsable(false)] public bool HasAdditionalBindings |
|
|
Olivier
|
|
Group: StrataFrame Users
Posts: 96,
Visits: 805
|
Govinda Berrio (8/27/2008) Ahhhh... I see now, just implement IWebBusinessBindable and you can set BusinessObjectName and BindingField properties in to bind a property (SelectedValue, Text, etc.) to a BO property. But I have to populate the dropdown with values some other way (I'm using WebBusinessBindingSource), unless I want to implement the IWebListControl.
Attached is the code showing that binding to a third party combobox is pretty much the same as setting up binding to a third party textbox.
Thanks for the help.
Hello You have some code , to understand How you implement the method in telerik control ? thanks Olivier,
============================================== Asp.net C# - Strataframe - telerik ==============================================
|
|
|
Dustin Taylor
|
|
Group: StrataFrame Users
Posts: 364,
Visits: 771
|
Yep, it's pretty straight forward . Glad you got it working!
|
|
|
Govinda Berrio
|
|
Group: StrataFrame Users
Posts: 94,
Visits: 481
|
Ahhhh... I see now, just implement IWebBusinessBindable and you can set BusinessObjectName and BindingField properties in to bind a property (SelectedValue, Text, etc.) to a BO property. But I have to populate the dropdown with values some other way (I'm using WebBusinessBindingSource), unless I want to implement the IWebListControl.
Attached is the code showing that binding to a third party combobox is pretty much the same as setting up binding to a third party textbox.
Thanks for the help.
|
|
|
Govinda Berrio
|
|
Group: StrataFrame Users
Posts: 94,
Visits: 481
|
Thanks Dustin, I'll try that now.
|
|
|