Last post Nov 10, 2010 09:14 PM by sjnaughton
Nov 10, 2010 10:04 AM|gijigae|LINK
In the List screen, I would like to insert a certain record into a table before update the list if the record does not exist in the table.
For example, in my Product List screen, Category field is a textbox and at backend DB it has FK relationsihp with Product.
When a user inserts/updates a new product, I want to first check whether a category entered exists.
If it doesn's, then the category should be inserted into the category table first to avoid FK constraint issue.
I am thinking of using "Instead Of Update" trigger if it cannot be done from DD side.
Would you please share your thoughts on this matter?
Nov 10, 2010 10:36 AM|sjnaughton|LINK
Hi Gijigae, I did this article for this type of situation A Popup Insert control for Dynamic Data
if the Category does not exist then you click the NEW button and a popup page open for you to enter the new category.
Nov 10, 2010 10:37 AM|smirnov|LINK
Another way is to update through stored procedure where you can check if record exists and perform insert if not.
Here's how to call SP
Nov 10, 2010 03:37 PM|Roddey|LINK
I am using your Popup Insert control to insert new items in the dropdown list on a related item.
calling the control from is in a Formview control. Either I did not translate your code exactly form the LNQ to sql to EFM or I have a namespace probelm when it calls the "NotAClue" web control.
Do you have any ideas as what may cause the error and have you given any more consideration to converting the code to use the Ajax modal popup extender control?
I really appreciate the work you have done and the help you have provided. I really don't understand why Microsoft has stopped making updates to the Dynamic Data controls.
Nov 10, 2010 09:14 PM|sjnaughton|LINK
Hi Roddey, I've just tested it with partail render enabled and it's working fine for me not sure what is going on, I would try a vanila project with minimal config to get popup to work and see if you still have the issue.
Dynamic Data 4