This is a migrated thread and some comments may be shown as answers.

AutoEdit not working

9 Answers 92 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 19 Jun 2012, 09:23 AM
After updating to 2012 Q2 RadDataForm don't work in AutoEdit mode regardless of property value.

9 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 19 Jun 2012, 10:22 AM
Hi,

 Indeed there was such an issue with the latest version and it was already resolved. The fix will be available with this week's internal build. 

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
kam
Top achievements
Rank 1
answered on 21 Jun 2012, 06:30 PM
Is there a workaround for this? I have updated my application to your latest release and the program is broken now. Very frustrating, it was a bad idea to update right after a recent release.

Thanks,
Kam
0
Dimitrina
Telerik team
answered on 22 Jun 2012, 08:09 AM
Hello Kam,

I am so sorry to hear that. Have you already upgraded to our Latest Internal Build?
In case you still have a problem, may I ask you to share more details on how the RadDataForm don't work in AutoEdit?

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
kam
Top achievements
Rank 1
answered on 22 Jun 2012, 06:59 PM
Didie,
Thanks for the note. I have tried the internal build and still the same issue. I am thinking it could be something else besides the AutoEdit issue. Here is my RadDataForm line:


<telerik:RadDataForm x:Name="newRecordsDataForm"
                            Grid.Row="1"
                            Grid.RowSpan="2"
                            AutoEdit="True"
                            AutoCommit="True"
                            Grid.Column="1"
                            Margin="0,0,12,0"
                            VerticalAlignment="Stretch"
                            AutoGenerateFields="False"
                            BorderThickness="0"
                            CommandButtonsVisibility="Navigation"
                            CurrentIndex="{Binding SelectedIndex,
                                                   ElementName=RadUpload1,
                                                   Mode=TwoWay}"
                            EditTemplate="{StaticResource dataformTemplate}"
                            FontSize="14"
                            LabelPosition="Above"
                            ReadOnlyTemplate="{StaticResource dataformTemplate}"
                            LabelStyle="{StaticResource labelStyle}" />

If you notice, I have had to add the ReadOnlyTemplate="{StaticResource dataformTemplate}" line otherwise the RadDataForm  doesn't show any data. Before I updated to Q2 2012 it worked just fine. Thanks.

Kam 
0
Dimitrina
Telerik team
answered on 25 Jun 2012, 03:27 PM
Hi,


As to your second question, I can see that you have set AutoGenerateField to False. Please check this help article for a further reference why you need to specify a template for the DataForm.

May I ask you to confirm the exact version of the binaries you have tested with? 

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
kam
Top achievements
Rank 1
answered on 25 Jun 2012, 05:46 PM
Thanks, What I don't understand is why I have to use a ReadOnlyTemplate if I am setting the AutoEdit/AutoCommit to true. My library version is 2012.2.620.1050.

Kam
0
Dimitrina
Telerik team
answered on 26 Jun 2012, 07:52 AM
Hi Kam,

May you please confirm that you have set the EditTemplate along with the ReadOnlyTemplate?

If yes, I would ask you to attach a demo project showing the wrong behaviour so that we could further investigate where the problem could be.

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
kam
Top achievements
Rank 1
answered on 26 Jun 2012, 08:01 AM
Didie,
Yes. I've previously attached part of my code that shows both ReadOnlyTemplate and EditTemplates are used. It should not be too hard to recreate the issue. My sample data is similar to this

public class Record : Serializable<Record>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="T:Record"/> class.
        /// </summary>
        public Record()
        {
        }
 
        private string title;
        /// <summary>
        /// Gets or sets the record title.
        /// </summary>
        /// <value>The record title.</value>
        [XmlAttribute]
        #if SILVERLIGHT
        [Required(ErrorMessage = "A title is required.")]
        [StringLength(200, MinimumLength = 5, ErrorMessage = "The title must be between 5-200 characters.")]
        #endif
        [Display(Name = "title")]
        public string Title
        {
            get
            {
                return this.title;
            } 
            set
            {
                if (value != this.title)
                {
                    this.title = value; 
                    this.OnPropertyChanged("Title");
                }
            }
        }
 
        private string description;
        /// <summary>
        /// Gets or sets the record description.
        /// </summary>
        /// <value>The record description.</value>
        [XmlAttribute]
        #if SILVERLIGHT
        [Required(ErrorMessage = "A description is required.")]
        [Display(Name = "description")]
        #endif
        public string Description
        {
            get
            {
                return this.description;
            } 
            set
            {
                if (value != this.description)
                {
                    this.description = value;                     
                    this.OnPropertyChanged("Description");
                }
            }
        }
...

It seems to work fine in WPF but SL has issues.

Thanks,
Kam
0
Dimitrina
Telerik team
answered on 27 Jun 2012, 05:50 AM
Hello,

We have created a sample project based on the code provided. We found out that you do not need to use a ReadOnlyTemplate. Please find the project attached for a reference.

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
DataForm
Asked by
Michael
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
kam
Top achievements
Rank 1
Share this question
or