Binding to Infragistics's UltraWinGrid

Posts   
 
    
rboarman
User
Posts: 83
Joined: 01-Feb-2005
# Posted on: 01-Feb-2005 18:31:08   

Hello,

I have a question about binding typed lists to Infragistics’ UltraWinGrid.

My typed list has a 1:m relationship in it similar to the standard Customer -> Orders example.

I retrieve the data like this:

ListTypedList lst = new ListTypedList();
lst.Fill();

And I bind it to my grid like this:

ultraGrid1.DataSource = lst;
ultraGrid1.DataBind();

This is simple, elegant and appears to work correctly. The grid displays the records including the data pulled from the Orders relationship.

The issue is that when I go to modify a cell I get a “Read Only” error. From my research it seems that typed lists are read only and cannot be used in this manner.

Is there a similar way to populate the grid that includes my 1:m relationship?

It seems to me that my code should work and that there should be a way to get a list of changes from the typed list that I could subsequently use to persist to a database.

Thank you in advance,

Rick

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 01-Feb-2005 19:07:55   

The typed list is readonly because there is no logic in place to update changes.

If you want to have an updatable typed list, do: foreach(DataColumn column in myTypedList.Columns) { column.ReadOnly=false; }

before you bind myTypedList to the grid.

Frans Bouma | Lead developer LLBLGen Pro