Change Dataform from AddNew Mode to ReadOnly

2 posts, 0 answers
  1. peter
    peter avatar
    37 posts
    Member since:
    Feb 2011

    Posted 12 Sep 2012 Link to this post

    Hi i have a raddataform which is linked to my ragdgridview, i click on my add button which brings up a RadDataForm in the AddNew mode, i then click on a Row in my radgridview, what i want is for this row to now display in ReadOnlyMode in my dataform, instead it displays in the edit mode. How do i go about solving this, thanks
  2. Almond
    Almond avatar
    43 posts
    Member since:
    Feb 2011

    Posted 12 Sep 2012 Link to this post

    Hello Peter,

    Could you please show us your XML code?

    I have successfully implemented such by just having the ItemSource of the RadDataForm pointing to the same RadDomainDataSource being used by RadGridview. Something like the code below:

    ItemsSource="{Binding DataView, ElementName=myDS}"

    Then added this code as well:

    Also, would just like to ask if you are clicking the RadGridView in EditMode as you have stated below? If so, I do believe that since its pointing to the same DataSource, the RadDataForm will automatically change the data in your form since you are currently in EditMode.  Try finishing/cancelling the Add/Edit mode first and then select a row in the RadGridView, the form should show your row as ReadOnly.  If it doesn't work, you might to try and implement DataTemplates for your RadDataForm.

    Hope this helps. 

Back to Top