Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
790
XamGrid collection new row
posted

Hello,

I have a collection of objects which implemepts IEditableCollectionView

In my AddNew i prepare the item i want to add to the collection . 

Than i enter the indexer of the object i am adding and setting it's attributes (i have a dynamic XamGrid columns)

Than in my CommitAdd i add the prepared item to the collection.

I do it like this:

 

private Boolean _isAdding = false;
        public object AddNew()
        {
            _isAdding = true;
            return _attributeRow = new FilterSetDefinitionAttributeRowViewModel() { ParentViewModel = _parent };
            return null;
        }
 
        
 
        private FilterSetDefinitionAttributeRowViewModel _attributeRow;
 
        public void CommitNew()
        {
            Add(_attributeRow);
            _isAdding = false;
        }
 
        public void CancelNew()
        {
           
But after it's complete i get an exception saying "Parameter count mismatch" .
Also what is the flow of adding new row? 
Because after i add new Row , It enters the AddNew method twice and to cancelnew. What do i need to set in  and 
IsAddingNew
CanAddNew

Parents
No Data
Reply Children
No Data