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
150
How add row to UltraGrid programatically?
posted

I have an EmployeeUltraGrid that is bound to IEnumerable(Of Employee).

 I want to add a row programatically.  How can I do this?

In the past, my data sources have always been DataTables and I would just add a row to the DataTable.

Not sure what do to now that the data source is IEnumerable(of Employee).

Thanks for amy help.

  • 469350
    Verified Answer
    Offline posted

    Hi,

        I don't thiink you can. The IEnerumable interface doesn't support adding as far as I know. In fact, I'm surprised you can even bind this to the grid. The grid requires the data source to be an IList or IBindingList, and I'm pretty sure you need an IBindingList in order to add rows through the grid.

        If you are using Visual Studio 2005 or higher, you could use the BindingList<> generic type. Or you could use an UltraDataSource as the data source of your grid in any version.