Group: Forum Members
Posts: 235,
Visits: 309
|
I've got the grid, businessGindingSource and BO mentioned earlier and a data navbar.
I've got this code in the BO:
private void ResultDefs_SetDefaultValues()
{
this.ResultDefId = Guid.NewGuid();
this.OccurrenceValue = 0;
}
When I click add on the data nav bar I get invalid cast errors in the code below both before and after the SetDefaultValues method is executed. I'm confused.
public System.Int32 OccurrenceValue
{
get
{
return (System.Int32)this.CurrentRow["OccurrenceValue"];
}
set
{
this.CurrentRow["OccurrenceValue"] = value;
}
}
public System.Guid ResultDefId
{
get
{
return (System.Guid)this.CurrentRow["ResultDefId"];
}
set
{
this.CurrentRow["ResultDefId"] = value;
}
}
Please help. Thanks,
Dan
|