views:

141

answers:

2

In Winforms you can have two controls tied to the same datasource in a way that when you select a record in one of them, the same record is selected in the other control.

Something that has always bugged me is being unable to non programatically reproduce this behavior in web development. Is there any way to do this, framework, control toolkit, anything?

+2  A: 

The short answer is no.

In order to achieve this result in Windows Forms, the data presenter control (a DataGrid for instance) needs to trigger an event handled by the Datasource that, in turn, (as it keeps a list of all data presenter controls bound to it) order them to rebind.

Although this effect can be reproduced in a web scenario, it's definetly not simple because of a simple fact: It's not single layered. The Datasource is on server.

The framework or control toolkit that would expose this feature would need to create a client representation of the Datasource that would reproduce the process I described in Javascript or other technology.

I personally know Telerik, DevExpress and some other widely used frameworks and I ensure you. " non programatically" you won't be able to do this.

Ciwee
+2  A: 

You will be able to in ASP.NET 4.0 with Sys.Observer.makeObservable.

rick schott
Do you know if that makes the selected record to be blocked for edition for other users too?
Pablo
No, this just allows for notification that a datasource(an array...etc) has changed and it will automatically update the controls that reference it on the client-side.
rick schott