views:

575

answers:

1

Hey all!

I have a Silverlight 3 datakit:DataForm bound to a ADO.NET Data Service 1.5 CTP2 datasource via the ItemsSource. A fragment is below...

var programs = DataServiceCollection.CreateTracked(
              dashboardService, query.EndExecute(asyncResult));
this.ProgramEditForm.ItemsSource = programs;

My DataForm definition is dead simple...

<"ProgramEditForm"
 CommandButtonsVisibility="All"
 AutoCommit="False"
 AutoEdit="False"/>

I have AutoEdit and AutoCommit off because I want the semi-modal feel of the user havign to explicity initiate a change, and then specifically accept the final results. And thats where it all goes bad.

When the user hits the pencil icon to initiate an edit, the OK button lights up but NEVER the cancel button. Since the navigation icons are disabled during edit (without autocommit) then the user has no way, other than changing the database, to back out of the edit.

Is this an artifact of the ADO.NET stuff?

Thanks!

+3  A: 

I am not 100% sure, but I think this has to do with lack of IEditableObject implementation on the types.

NikhilK
Yes, that sure seems to be the issue - now I need to see if there is an easy way to hack a ado.net data services IEditableObject interface onto the entities.
Soulhuntre