Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

DataFormCommandProvider - AddNew

$
0
0

I have a dataform using a custom DataFormCommandProvider. The CommandProvider has an overriden CanAddNewExecute() function that always returns true.

When I first go to the page with this control I can Add New items all I want. However once I edit an item, and commit or cancel the edit, the add new button (which is still enabled) stops working. 


In debug I can see the 
CommandProvider's AddNew() function is getting called; the only difference is in the beginning the Dataform.CanAddItems property is true. After the Edit, the Dataform.CanAddItems property is false. I believe that while it is false it will not do the AddNewItem functionality.

 

 How can I get the Dataform.CanAddItems property back to being true after an edit, so I can continue adding items? 


Viewing all articles
Browse latest Browse all 94857

Trending Articles