Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Data Binding / May 2006

Tip: Looking for answers? Try searching our database.

Binding Lost?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Özden Irmak - 24 May 2006 19:40 GMT
Hello,

I wrote a custom control which has a textbox inside it and it has a value
property which is bindable to a datasource.

In my sample screen, I have a datagrid and a bunch of my custom control. I
bind them to the same datasource so when the user moves in the rows of the
grid, my custom control values do change, it's fine.

In this screen, I also have a section where I let the user to filter
records. To filter the records, I set a dataview to my grid based upon the
user entry as filter criteria.

The problem starts here, when I set the dataview to the grid, all of my
custom controls loose their binding. No matter I navigate on the rows, none
of the values in my control gets updated?

Why does this occur, can anybody help?

Regards,

Özden
Chris Jobson - 25 May 2006 21:15 GMT
> Hello,
>
[quoted text clipped - 14 lines]
>
> Why does this occur, can anybody help?

It sounds like you are changing the DataSource property of the grid. If so
then this explains the problem - the controls will only update in response
to navigation on the grid if they are bound to the SAME datasource as the
grid (i.e. the values of the DataSource properties of the grid and the
controls must be identical). The solution is either to rebind the controls
to the dataview when you bind the grid to it, or to bind everything to a
dataview initially then just change the dataview's filter property in
response to the user input.

Chris Jobson

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.