This is a migrated thread and some comments may be shown as answers.

Adding Rows Questions

0 Answers 68 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 09 Nov 2011, 09:26 PM
Hello,

I'm using the Q3 2009 WinForm controls and unfortuantely this project is way too big to convert to a newer project now. Unfortuantely, the Help guide that comes with Telerik controls isn't enough and I have a few questions:
  1. Trying to manually add a row isn't working. Using grdGrid.Rows.Add() I've tried several input parameters. I've used the custom object I built (that the DataSource is bound to a collection of) as well as creating a generic object array that contains the values the columns need. Both ways, I get the following error:
    The following exception occurred in the RadGridView:
     
    System.NotSupportedException: The list must be an IBindingList to AddNew. at System.Windows.Forms.CurrencyManager.AddNew() at Telerik.WinControls.UI.GridViewRowCollection.Add(Object[] values)
     
    To replace this default dialog please handle the DataError event.
     
  2. How closely is the DataSource tied to the Grid? I thought if I added a record to the DataSource (and even re-set the Grid's DataSource) the new row would show, but I'm wrong.

Edit: Please remove this post. It turns out I needed to use a BindableList<T>. It turns out the List<T> support is not very strong in Q3 2009.

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Eric
Top achievements
Rank 1
Share this question
or