Menu

adding a extra column

karl
2005-10-12
2013-03-07
  • karl

    karl - 2005-10-12

    Hi

    Is it possible to add a extra column to a objectview. I want to populate this row before i bind the objectview to the grid. But Im not able to do this.

    groupView.Columns.Add("Term","Benmning", true);
                groupView.Columns.Add("Name","Namn", true);
                groupView.Columns.Add("IsActive", "IsActive", true);
                groupView.Columns.Add("MemberList","MemberList", false);

    Last column is the extra column which i tries to populate with.

    foreach(ObjectViews.ObjectViewRow row in groupView.Rows)
                {   
                    row["MemberList"] = "Malin,Patrik";
                }

    But it says the column is readonly. Any ideas?

     
    • Martijn Boland

      Martijn Boland - 2005-10-13

      The ObjectView always maps columns to exisiting underlying properties. If the underlying object doesn't have a "MemberList" property, then you can't add such a column.

      We have to investigate why it says that the column is readonly. That's not correct. It should throw an exception when adding a column that doesn't map to a property.

       

Log in to post a comment.

MongoDB Logo MongoDB