Binding Data To Rad Controls With Ria Domain Data Source and Validation Issue

6 posts, 0 answers
  1. Ahmed
    Ahmed avatar
    55 posts
    Member since:
    Oct 2012

    Posted 19 Dec 2010 Link to this post

    I have Rad Masked Text Box and I bind it with RIA Domain Data Source
    <riaControls:DomainDataSource AutoLoad="True" d:DesignData="{d:DesignInstance my:User_Skill, CreateList=true}" Height="0" LoadedData="user_SkillDomainDataSource_LoadedData" Name="user_SkillDomainDataSource" QueryName="GetUser_SkillByIDQuery" Width="0"
        <riaControls:DomainDataSource.DomainContext
            <my1:DomainServiceClass /> 
        </riaControls:DomainDataSource.DomainContext
    </riaControls:DomainDataSource>

    and The Rad Masked Text Box Code
    <telerik:RadMaskedTextBox HorizontalAlignment="Left" Margin="92,235,0,0" Name="skill_nameRadMaskedTextBox" VerticalAlignment="Top" Width="197" Value="{Binding Path=skill_name, Mode=TwoWay,ValidatesOnNotifyDataErrors=True}" MaskType="None" MaskedText="" />

    The Problem is When I Create New Object Like That in RIA Doamin Data Source
    (user_SkillDomainDataSource.DataView as IEditableCollectionView).AddNew();

     

    After That when The New Created Object Passed To Controls The Error Notification for Required Proberties Appear Immediatly Before Doing Any Thing ........ I don't Want That I want The Notifcation Disapled Until I start Working With Controls ........ Moving Between Controls or When The Controls Lost Focus

  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    637 posts

    Posted 22 Dec 2010 Link to this post

    Hello Ahmed,

    The RadMaskedTextBox binds directly to the Validation.Errors attached property and retrieves the errors. Currently, there is no way to delay this process and have validation at the same time. What you could do is to bind the RadMaskedTextBox and activate the validation when you start working with the controls.

    Kind regards,
    Alex Fidanov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. Ahmed
    Ahmed avatar
    55 posts
    Member since:
    Oct 2012

    Posted 22 Dec 2010 Link to this post

    Could You Explain Me That How Can I do That
    " What you could do is to bind the RadMaskedTextBox and activate the validation when you start working with the controls."

  4. Petar Mladenov
    Admin
    Petar Mladenov avatar
    3082 posts

    Posted 27 Dec 2010 Link to this post

    Hello Ahmed,

    Could you please check out this articles related to databinding and validation in RadMaskedTextBox and let us know if they help you or not? We would be glad to assist you further. 

    Kind regards,
    Petar Mladenov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  5. Ahmed
    Ahmed avatar
    55 posts
    Member since:
    Oct 2012

    Posted 30 Dec 2010 Link to this post

    But The Problem is I have Auto Generated Validation Class and I dont How To Stop it it has all Properties and Auto Genrated Validation its Name is "ProjectName.Web.g.cs"
  6. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3299 posts

    Posted 30 Dec 2010 Link to this post

    Hi Ahmed,

    In this scenario, I believe there is no straight forward solution for this. You can try providing your custom validation tooltip if you want to achieve this specific logic. Please also note, that for the upcoming Q1 2011, we are refactoring the RadMaskedTextBox control. We are going to make some changes around the validation.

    We could also provide an out-of-the-box way to turn on and off the validation tooltip at any time. I added it as a feature request and you can vote for it in our PITS thus increasing its priority. 


    All the best,
    Tina Stancheva
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
Back to Top