B
Bill McCormick
I have a Datagrid that displays records from a table. I'm calling a
LinqToSql stored procedure that does successfully insert a row into the
table, but unfortunately I don't see the new record until the
application is restarted.
The code looks something like this:
try {
int result = _db.MakeNewRec(param1,param2,param3);
if (result == 0) {
//do some stuff
}
} catch (Exception ex) {
// handle ex
}
result is 0 and the new record is there, but the grid does not update.
The datagrid has a binding that looks like this:
<toolkit
ataGrid
x:Name="RecGrid"
ItemsSource="{Binding Recs}"
...
where Recs is a Datacontext property of _db that looks like this (from
the generated code):
public System.Data.Linq.Table<Rec> Recs
{
get {
return this.GetTable<Rec>();
}
}
What's the trick here? Anybody know?
TIA,
Bill
LinqToSql stored procedure that does successfully insert a row into the
table, but unfortunately I don't see the new record until the
application is restarted.
The code looks something like this:
try {
int result = _db.MakeNewRec(param1,param2,param3);
if (result == 0) {
//do some stuff
}
} catch (Exception ex) {
// handle ex
}
result is 0 and the new record is there, but the grid does not update.
The datagrid has a binding that looks like this:
<toolkit
![Big Grin :D :D](/styles/default/custom/smilies/grin.gif)
x:Name="RecGrid"
ItemsSource="{Binding Recs}"
...
where Recs is a Datacontext property of _db that looks like this (from
the generated code):
public System.Data.Linq.Table<Rec> Recs
{
get {
return this.GetTable<Rec>();
}
}
What's the trick here? Anybody know?
TIA,
Bill