|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how can I bind my custom entity objects to data controlsI have implemented custom data entity objects, so I like to bind my
entities to web server data controls, so I want to know what extra code I should implement to to do that? Hi,
You need to derive your objects from System.ComponentModel.BindingList<C> (is using .NET 2.0) to implement 2 way data binding mechanism. Regards, Vivek Show quote "Mehdi" wrote: > I have implemented custom data entity objects, so I like to bind my > entities to web server data controls, so I want to know what extra code > I should implement to to do that? > > Thanks Vivek,
I'm already using MS.NET ver 1.1. It would be so helpfull if you could introduce me one or more articles. Vivek Thakur (attherate donotspam) wrote: Show quote > Hi, > > You need to derive your objects from System.ComponentModel.BindingList<C> > (is using .NET 2.0) to implement 2 way data binding mechanism. > > Regards, > > Vivek > -- > Vivek Thakur (MCP) > www.vivekthakur.com > > > "Mehdi" wrote: > > > I have implemented custom data entity objects, so I like to bind my > > entities to web server data controls, so I want to know what extra code > > I should implement to to do that? > > > > Hi again,
You need to implement IBindingList methods in your custom classes. See this link for details: http://msdn2.microsoft.com/en-us/library//system.componentmodel.ibindinglist.aspx Regards, Vivek Show quote "Mehdi" wrote: > Thanks Vivek, > I'm already using MS.NET ver 1.1. It would be so helpfull if you could > introduce me one or more articles. > > Vivek Thakur (attherate donotspam) wrote: > > Hi, > > > > You need to derive your objects from System.ComponentModel.BindingList<C> > > (is using .NET 2.0) to implement 2 way data binding mechanism. > > > > Regards, > > > > Vivek > > -- > > Vivek Thakur (MCP) > > www.vivekthakur.com > > > > > > "Mehdi" wrote: > > > > > I have implemented custom data entity objects, so I like to bind my > > > entities to web server data controls, so I want to know what extra code > > > I should implement to to do that? > > > > > > > > Note: binding changed significantly between 1.1 and 2.0. With 1.1, binding
was only one way. You had to re-wire your properties in order to save values on postback. 2.0 can do 2 way binding, but requries that your object use a specific pattern of retrieval/creation and persistance, otherwise you are stuck with manual binding. If you use the prescribed pattern you can achieve binding with no custom code. Otherwise, you can code it all yourself. Jim Wooley http://devauthority.com/blogs/jwooley/default.aspx Show quote > Thanks Vivek, > I'm already using MS.NET ver 1.1. It would be so helpfull if you could > introduce me one or more articles. > Vivek Thakur (attherate donotspam) wrote: > >> Hi, >> >> You need to derive your objects from >> System.ComponentModel.BindingList<C> (is using .NET 2.0) to implement >> 2 way data binding mechanism. >> >> Regards, >> >> Vivek >> -- >> Vivek Thakur (MCP) >> www.vivekthakur.com >> "Mehdi" wrote: >> >>> I have implemented custom data entity objects, so I like to bind my >>> entities to web server data controls, so I want to know what extra >>> code I should implement to to do that? >>> |
|||||||||||||||||||||||