Problem Using a DataGrid Bound to Array


T

TommyVee

I have a source of data which I'd like to use to initially populate a
DataGrid. This data does not come from a database. Once populated, I'd like
to use all DataGrid features, e.g., add row, delete row, update row, sort
column, etc. to tweak the in memory copy of the data. At "Save" time, I need
to iterate through the rows and columns of the in memory Data Grid.

As recommended, I used an array of structures with get/set Properties, and I
was able to get the DataGrid loaded. However, the resultant grid doesn't
have the ability to add or delete rows. My sense is that it is in some ways
still bound to the underlying array elements and that to do add or delete,
I'd have to somehow instantiate a new array element or delete an existing
one. I don't want to do that. All I want to do is use an array (or
whatever) to do the initial population of a fully functional grid.

Is this possible? At the end of the day, I need a very simple GUI paradigm
for loading, updating and saving a table of data which is not connected to a
database. DataGrid seems to provide the ideal solution.

Thanks, Tommy
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top