Completed
Last Updated: 21 Jun 2018 14:06 by ADMIN
ADMIN
Created by: Dimitar
Comments: 0
Category:
Type: Bug Report
0
Use attached to reproduce.
Completed
Last Updated: 01 Dec 2017 06:16 by ADMIN
To reproduce:

1. Drop RadDaraEntry and RadDataLayout controls from the toolbox on to the windows form.
2. Click on any of the control. 
3. Observe that the move symbol is not visible for the controls.
We need to select the control from Properties tab list box to move the control on the forms.

Note: other RadControls that also contain an internal container should allow dragging the control at design time as well.
Completed
Last Updated: 16 Oct 2017 10:28 by ADMIN
To reproduce:
- Just open the ThemeViewer and type some text in the RadDataEntry.

Workaround:
foreach (RadPanel item in radDataEntry1.Controls[0].Controls)
{
    var textBox = item.Controls[0] as RadTextBox;
    if (textBox != null)
    {
        textBox.TextBoxElement.TextBoxItem.HostedControl.MinimumSize = new Size(0, 24);
    }
}
Completed
Last Updated: 10 Mar 2017 08:39 by Vuqar
To reproduce:
- Bind the control to a list of the following objects:
 public class MyObj
{
    public MyEnum TestEnum { get; set; }

    public MyObj(MyEnum testEnum)
    {
        this.TestEnum = testEnum;
    }
}

public enum MyEnum : int
{
    Value1,
    Value2,
    Value3,
    Value4
}

- Change the value and move to the next entry.
- You will notice that the value of the previous entry is not changed.

Workaround:
void radDataEntry1_BindingCreating(object sender, Telerik.WinControls.UI.BindingCreatingEventArgs e)
{
    if (e.Control is RadDropDownList)
    {
        e.PropertyName = "SelectedValue";
    }
}
Completed
Last Updated: 11 Nov 2016 09:19 by ADMIN
To reproduce: use the following code:

public Form1()
{
    InitializeComponent();
   
    this.radDataEntry1.DataSource = new Employee()
    {
        FirstName = "Sarah",
        LastName = "Blake",
        Salary = null,
    };
}

private class Employee
{
    public string FirstName { get; set; }

    public string LastName { get; set; }

    public Nullable<int> Salary { get; set; }
}

private void radDataEntry1_EditorInitializing(object sender, EditorInitializingEventArgs e)
{
    if (e.Property.Name == "Salary")
    {
        RadMaskedEditBox radMaskedEditBox = new RadMaskedEditBox();
        radMaskedEditBox.MaskType = MaskType.Numeric;
        radMaskedEditBox.Mask = "c";
        radMaskedEditBox.NullText = "$0.00";
        radMaskedEditBox.TextMaskFormat = MaskFormat.IncludePromptAndLiterals;
        radMaskedEditBox.MaskedEditBoxElement.StretchVertically = true;
        e.Editor = radMaskedEditBox;
    }
}

private void radDataEntry1_BindingCreated(object sender, BindingCreatedEventArgs e)
{
    if (e.DataMember == "Salary")
    {
        e.Binding.Parse += new ConvertEventHandler(Binding_Parse);
    }
}

void Binding_Parse(object sender, ConvertEventArgs e)
{
    Nullable<int> salary = int.Parse(e.Value.ToString(), NumberStyles.Currency);
    e.Value = salary;
}

1. Focus the RadMaskedEditBox.
2. Enter some value and press Tab key.
3. The value will be reset to its initial state.

Workaround:

public class CustomRadDataEntry : RadDataEntry
{
    public override string ThemeClassName  
    { 
        get 
        { 
            return typeof(RadDataEntry).FullName;  
        }
    }

    protected override RadScrollablePanelElement CreatePanelElement()
    {
        return new CustomRadDataEntryElement();
    }
}

public class CustomRadDataEntryElement:RadDataEntryElement
{
    protected override Type ThemeEffectiveType     
    { 
        get    
        { 
            return typeof(RadDataEntryElement);     
        }
    }

    protected override Binding CreateBinding(Control control, string propertyName, string dataMember)
    {
        Binding binding = null;
        object bindObject = null;

        if (this.Manager is CurrencyManager)
        {
            bindObject = (this.Manager as CurrencyManager).List;
        }
        else
        {
            bindObject = this.Manager.Current;
        }
        BindingCreatingEventArgs args = new BindingCreatingEventArgs(control, propertyName, bindObject, dataMember);
        OnBindingCreating(this, args);

        if (args.Cancel)
        {
            return binding;
        }

        binding = new Binding(args.PropertyName, bindObject, args.DataMember, true, DataSourceUpdateMode.OnPropertyChanged);

        OnBindingCreated(this, new BindingCreatedEventArgs(control, args.PropertyName, bindObject, args.DataMember, binding));

        return binding;
    }
}

Resolution: 
You need to subscribe to the BindingCreating event and set the FormattingEnabled property to true. Here is the code snippet: 
void radDataEntry1_BindingCreating(object sender, BindingCreatingEventArgs e)
{
    if (e.DataMember == "Salary")
    {
        e.FormattingEnabled = true;
    }
} 
Completed
Last Updated: 20 Oct 2016 10:44 by ADMIN
Please refer to the attached gif file.

Workaround: handle the SelectedIndexChanged event and update the DataBoundItem programmatically:

Dim dt As New DataTable
Dim bs As New BindingSource
Sub New()

    InitializeComponent()
    AddHandler Me.RadDataEntry1.EditorInitializing, AddressOf EditorInitializing

    dt.Columns.Add("Id", GetType(Integer))
    dt.Columns.Add("Name", GetType(String))
    dt.Columns.Add("Type", GetType(DeliveryType))

    dt.Rows.Add(1, "Item1", DeliveryType.Type2)
    dt.Rows.Add(2, "Item2", DeliveryType.Type3)
    dt.Rows.Add(3, "Item3", DeliveryType.Type1)

    bs.DataSource = dt
    Me.RadDataEntry1.DataSource = bs
    Me.RadBindingNavigator1.BindingSource = bs
End Sub

Public Enum DeliveryType
    Type1 = 0
    Type2 = 1
    Type3 = 2
End Enum

Private Sub EditorInitializing(sender As Object, e As Telerik.WinControls.UI.EditorInitializingEventArgs)
    Dim ddl As RadDropDownList = TryCast(e.Editor, RadDropDownList)
    If ddl IsNot Nothing Then
        AddHandler ddl.SelectedIndexChanged, AddressOf SelectedIndexChanged
    End If
End Sub

Private Sub SelectedIndexChanged(sender As Object, e As Data.PositionChangedEventArgs)
    Dim dataRowView As DataRowView = TryCast(bs.Current, DataRowView)
    dataRowView.Row("Type") = e.Position
End Sub
Completed
Last Updated: 23 Aug 2016 11:34 by ADMIN
To reproduce: add a RadBindingNavigator and a RadDataEntry

Use the following code:

RadDropDownList ddl;
BindingSource bs;

public Form1()
{
    InitializeComponent();

    this.radDataEntry1.EditorInitializing += radDataEntry1_EditorInitializing;
    bs = new BindingSource();

    DataTable dt = new DataTable();
    dt.Columns.Add("ID", typeof(int));
    dt.Columns.Add("Description", typeof(string));
    dt.Columns.Add("Code1", typeof(string));
    dt.Columns.Add("Code2", typeof(string));
           
    dt.Rows.Add(1, "Description", "DE", "CD");
    dt.Rows.Add(2, "Description", "CD", "AB");
    dt.Rows.Add(3, "Description", "BC", "DE");
    bs.DataSource = dt;  
    this.radDataEntry1.DataSource = this.radBindingNavigator1.BindingSource = bs;
}

private void radDataEntry1_EditorInitializing(object sender, Telerik.WinControls.UI.EditorInitializingEventArgs e)
{
    if (e.Property.Name == "Code1" || e.Property.Name == "Code2")
    {
        ddl = new RadDropDownList();
        using (ProvinceCodesEntities dbContext = new ProvinceCodesEntities())
        {
            IEnumerable<ProvinceCode> codeList = dbContext.ProvinceCodes.ToList();

            ddl.DataSource = codeList;
            ddl.DisplayMember = "ProvinceCode1";
            ddl.ValueMember = "ProvinceCode1";
        }
        e.Editor = ddl;
    }
}

When you run the application, you will notice that only the first item in the collection has incorrect mapped values for the properties which use RadDropDownList as an editor. When navigating to the next items, the values are OK.

Workaround:

RadDropDownList ddl;
BindingSource bs;

public Form1()
{
    InitializeComponent();
    this.radDataEntry1.EditorInitializing += radDataEntry1_EditorInitializing;
    bs = new BindingSource();

    DataTable dt = new DataTable();
    dt.Columns.Add("ID", typeof(int));
    dt.Columns.Add("Description", typeof(string));
    dt.Columns.Add("Code1", typeof(string));
    dt.Columns.Add("Code2", typeof(string));
           
    dt.Rows.Add(1, "Description", "DE", "CD");
    dt.Rows.Add(2, "Description", "CD", "AB");
    dt.Rows.Add(3, "Description", "BC", "DE");
    bs.DataSource = dt;  
}

private void radDataEntry1_EditorInitializing(object sender, Telerik.WinControls.UI.EditorInitializingEventArgs e)
{
    if (e.Property.Name == "Code1" || e.Property.Name == "Code2")
    {
        ddl = new RadDropDownList();
        using (ProvinceCodesEntities dbContext = new ProvinceCodesEntities())
        {
            IEnumerable<ProvinceCode> codeList = dbContext.ProvinceCodes.ToList();
            
            ddl.DataSource = codeList;
            ddl.DisplayMember = "ProvinceCode1";
            ddl.ValueMember = "ProvinceCode1";
            ddl.Parent = this;
        }
        e.Editor = ddl;
    }
}

private void Form1_Load(object sender, EventArgs e)
{
    this.radDataEntry1.DataSource = this.radBindingNavigator1.BindingSource = bs;
}
Completed
Last Updated: 11 Sep 2015 08:19 by ADMIN
Completed
Last Updated: 11 Sep 2015 07:56 by ADMIN
To reproduce: 
1. Drag and drop RadDataEntry on the form
2. Select the PanelContainer element and open the smart tag 
3. Select 'Undock in parent container' 
4. Select the undocked scrollable panel and move it out of control. 
5. Save the form
6. You can not move the scrollable panel or dock it parent container. 
Completed
Last Updated: 05 Jun 2015 08:15 by Chris Vaughn
To reproduce:
- Add RadDataEntry to a form and show the GDI objects count in the Task Manager.
- Press and hold the tab key.

Workaround:
this.radDataEntry1.DataEntryElement.ErrorIcon = null;
Completed
Last Updated: 20 Nov 2014 14:07 by Richard
To reproduce: 
1. Add a RadGridView, a RadDataEntry, a RadBindingNavigator and a MS BindingNavigator.
2. Bind all of the above controls to absolutely the same BindingSource, e.g. Northwind.Categories table.
3. Click over the "Add" button of the RadBindingNavigator/MS BindingNavigator once. RadGridView displays the new record, but the RadDataEntry does not show it. Each next click of the "Add" button navigates the RadDataEntry to the previously added record.

Workaround:

//RadBindingNavigator:

this.radBindingNavigator1.BindingNavigatorElement.AddNewButton.Click += AddNewButton_Click;

private void AddNewButton_Click(object sender, EventArgs e)
{ 
    this.radBindingNavigator1.BindingSource.MovePrevious();
    this.radBindingNavigator1.BindingSource.MoveLast();
}


//MS BindingNavigator:

ToolStripButton addButton = (ToolStripButton)this.bindingNavigator1.Items[this.bindingNavigator1.Items.Count - 2] ;
if (addButton != null)
{
    addButton.Click += addButton_Click;
}

private void addButton_Click(object sender, EventArgs e)
{
    this.bindingNavigator1.BindingSource.MovePrevious();
    this.bindingNavigator1.BindingSource.MoveLast();
}
Completed
Last Updated: 01 Oct 2014 12:15 by Jason
To reproduce:
- Bind RadDataEntry to an object that has DateTime property.
- Change the value using the FreeFormDateTime mask type (enter 101010).
- The value is not changed.

Workaround:

RadDateTimePicker editor;

void radDataEntry1_EditorInitializing(object sender, EditorInitializingEventArgs e)
{
    if (e.Property.Name == "obj")
    {
        editor = new RadDateTimePicker();
        editor.Format = DateTimePickerFormat.Short;
        editor.DateTimePickerElement.TextBoxElement.MaskType = MaskType.FreeFormDateTime;
        RadMaskedEditBoxElement element = editor.DateTimePickerElement.TextBoxElement.TextBoxItem.Parent as RadMaskedEditBoxElement;
        FreeFormDateTimeProvider provider = element.Provider as FreeFormDateTimeProvider;

        provider.ParsedDateTime += provider_ParsedDateTime;

        e.Editor = editor;
        
    }
}

void provider_ParsedDateTime(object sender, EventArgs e)
{
    editor.Value = (DateTime)(sender as FreeFormDateTimeProvider).Value;
}
Completed
Last Updated: 07 Jul 2014 12:44 by ADMIN
To reproduce:
- Create a binding source and use the following datatable as its datasource:
 static DataTable GetTable()
{
    DataTable table = new DataTable();

    table.Columns.Add("Str", typeof(string));
    table.Columns.Add("Days", typeof(Days));
    
    table.Rows.Add("Value 1", Days.Fri);
    table.Rows.Add("Value 2", Days.Mon);

    return table;
}

- Bind the data entry to the binding source
- You will notice that the enum value is not displayed.

Workaround:
void radDataEntry1_BindingCreating(object sender, BindingCreatingEventArgs e)
{
    if (e.DataMember == "Days")
    {
        e.PropertyName = "SelectedIndex";
    }
}