RadDataEntry default values binding

3 posts, 0 answers
  1. Christian
    Christian avatar
    6 posts
    Member since:
    Apr 2012

    Posted 13 May 2017 Link to this post


    I want to initialize default values on editor loading:


    <p>void radDataEntry1_BindingCreated(object sender, BindingCreatedEventArgs e)</p><p>{</p><p>if (e.DataMember == "IsAdministrator")</p><p>&nbsp; &nbsp; &nbsp;{ </p><p> &nbsp;&nbsp;&nbsp;&nbsp;        e.Binding.NullValue = false;</p><p>&nbsp; &nbsp; &nbsp;}</p><p>}</p>

    Thank you.

  2. Christian
    Christian avatar
    6 posts
    Member since:
    Apr 2012

    Posted 13 May 2017 in reply to Christian Link to this post

    void radDataEntry1_BindingCreated(object sender, BindingCreatedEventArgs e)
    if (e.DataMember == "IsAdministrator")
         e.Binding.NullValue = false;
  3. Hristo
    Hristo avatar
    1189 posts

    Posted 15 May 2017 Link to this post

    Hello Christian,

    Thank you for writing.

    Setting the NullValue property is intended to handle scenarios of unsupported values by the editors. If you want the control to display a predefined set of fields, please consider creating an object with predefined values the required properties. For example, if you are following the getting started article you can bind the control to the following Employee object and have the Occupation property predefined:
    BindingSource bs = new BindingSource();
    empl = new Employee()
        Occupation = "Supplied Manager",
    bs.DataSource = empl;
    this.radDataEntry1.DataSource = empl;

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top