locked
How to implement a required field based on another field's input? RRS feed

  • Question

  • User992715993 posted

    Hi, I'm using Entity Framework .NET 3.5 SP1. I created a Formview using EntityDataSource and DynamicControls.

    I have requirement to check "if TableA.ColumnX is populated, then TableB.ColumnY must also be populated"? 

    What the best way to do this and could you provide some code samples?

    Thanks in advance for your help!

    Tuesday, June 14, 2011 8:33 AM

Answers

  • User-330204900 posted

    Hi mfromm, is this a full Dyanamic Data site or just a simple DD (no DynamicData folder structure and using SetMetatable extension method?

    if the laster then this will be difficult if however you are using a DD site with the DynamicData folder structure then you can look at this sample here o mine Communicating Between FieldTemplates in Dynamic Da...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 14, 2011 5:17 PM
  • User992715993 posted

    Thanks again, Steve!

    I am not using the full DD website project, but I do have the DynamicData folder structure that I use for the Formview DynamicControl. Not using any extensions.

    I will have to review your code. I would like to use annotations if possible but I'm still new to DD, custom annotations and extensions.

    For the meantime, I used OnSavingChanges() to do the special validations on most of my fields.  

    But I'm glad you suggested this!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 15, 2011 2:07 PM

All replies

  • User-330204900 posted

    Hi mfromm, is this a full Dyanamic Data site or just a simple DD (no DynamicData folder structure and using SetMetatable extension method?

    if the laster then this will be difficult if however you are using a DD site with the DynamicData folder structure then you can look at this sample here o mine Communicating Between FieldTemplates in Dynamic Da...

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 14, 2011 5:17 PM
  • User992715993 posted

    Thanks again, Steve!

    I am not using the full DD website project, but I do have the DynamicData folder structure that I use for the Formview DynamicControl. Not using any extensions.

    I will have to review your code. I would like to use annotations if possible but I'm still new to DD, custom annotations and extensions.

    For the meantime, I used OnSavingChanges() to do the special validations on most of my fields.  

    But I'm glad you suggested this!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 15, 2011 2:07 PM