New Posts New Posts RSS Feed: How do I create a new row on the Ultragrid?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

How do I create a new row on the Ultragrid?

 Post Reply Post Reply
Author
IdeaBlade View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 30-May-2007
Location: United States
Posts: 353
Post Options Post Options   Quote IdeaBlade Quote  Post ReplyReply Direct Link To This Post Topic: How do I create a new row on the Ultragrid?
    Posted: 16-Jul-2007 at 10:07am
The question that you are asking is one of the most often asked question in Technical Support with the question most often referring to the Infragistics UltraGrid or to the DevExpress XtraGrid.
 
There is an excellent tutorial on this subject in the 200 Series - "Add/Delete on Child Grid".
Back to Top
Customer View Drop Down
Senior Member
Senior Member
Avatar
User Submitted Questions to Support

Joined: 30-May-2007
Location: United States
Posts: 260
Post Options Post Options   Quote Customer Quote  Post ReplyReply Direct Link To This Post Posted: 16-Jul-2007 at 10:06am
Quick question about adding a new item when using binding sources. I have tried to use the Create method but it says that the properties I need to set are read only. The table is one-many table where the key's are values from other tables.
 
Table - PK
DataStore - DSId
Users - UserId
UserRights - DSId , UserId
 
In the UserRights BO I have the following:
    public static UserRights Create(PersistenceManager pManager, int dsId, int userId)
    {
 
        UserRights aUserRights = pManager.CreateEntity<UserRights>();
 
        // if this object type requires a unique id and you have implemented
        // the IIdGenerator interface implement the following line
        //pManager.GenerateId(aUserRights, // add id column here //);
        aUserRights.AddToManager();
 
        // Add custom code here
        aUserRights.Dsid = dsId;  -> says it is read only
        aUserRights.UserId = userId; -> says it is read only
 
        aUserRights.AddToManager();
        return aUserRights;
    }
 
 
How do I create a new row?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down