Insertion row in cardview -invalid operation exception

Jul 4, 2009 at 7:35 PM

I am working with xceed datagrid with cardview.
i wanted to give the option of inserting a new insertion row in the cardview .that is done through the following code:
        private void Window_Loaded(object sender, RoutedEventArgs e)
            Connection con = new Connection();
            DataSet ds = new DataSet();
            ds = con.ProcessSelectQuery("select * from studentinfo");
            //ds = con.ProcessSelectQuery("select stdinfo_regid as RegId,stdinfo_fname as [First Name],stdinfo_lname as [Last Name],batch_degree as Degree,batch_sem as Semester from studentinfo s,batch b where s.batch_id=b.batch_id  and stdinfo_regid>0");
            dataGridControl1.ItemsSource = ds.Tables[0].DefaultView;
            DataTemplate template = new DataTemplate();
            template.VisualTree = new FrameworkElementFactory(typeof(InsertionRow));
the problem is when i type in the data in the new row and press enter ..  
The error i get is :
invalid operation exception 
Cannot change or check the contents or Current position of CollectionView while Refresh is being deferred. 
Please help me .. i want to learn .. and i am new to all this ... :( 

Jul 7, 2009 at 9:56 PM

Hi, this forum is for the Microsoft WPF DataGrid.  If you have questions about the Xceed DataGrid, you should visit the Xceed forums: