Otis wrote:
So basicly, you want to find an entity back based on the PK?
Yeah, I think that sounds right. I will have a entity collection which I then to pull a entity out of using the PK. I think I then need to set a property value using the index of the property. The code below now has comments added to it that shows what needs to happen. The two things here that I don't know how to do is get the entity from the collection using the PK and setting the entity property using the property index. Unless I am reading this code wrong I think this is what needs to happen.
private void GridEX1_CellUpdated(object sender, Janus.Web.GridEX.ColumnActionEventArgs e)
{
DataTable table = this.northWind1.Products; // Get entity collection
Janus.Web.GridEX.GridEXRow gridEXRow = this.GridEX1.GetRow();
if(gridEXRow.RowType != RowType.NewRecord)
{
DataRow dataRow = table.Rows.Find(gridEXRow.DataKeyValue); // Get entity from collection using PK
if(dataRow != null)
{
dataRow[e.Column.DataMember] = gridEXRow.Cells[e.Column].Value; // Set value of property using property index
}
}
}