"Proper" way of updating bound controls and grids
Hi all.
Working at this company I'm at, is the first time I've ever used "production" programming methods and "proper" system architecture.
At the moment, I'm a little confused as to how I can achieve 2 tasks within the software. I hope you can help!!
1) Firstly, we have numerous gridview controls on various usercontrols, listing things like companies, contacts etc (kind of like a phone book). You can filter the contacts down by selecting a company from a data-bound drop-down box to display contacts from an individual company. However... if I were to edit a companies name from the companies module of the software and then look for it in the drop-down box in the contacts module, it still displays the original companies name. What is the "proper" way of solving this problem??
2) Secondly, (similar to the first), if I add a company or contact, how could I then get combo boxes across the application to then show that item within its object list??? This also applies to the grids that are in the software!
The most obvious answer to BOTH questions would be "jsut re-populate the control", but... surely this isn't the correct way of doing things and personally, I don't want to do that because we have thousands of objects going into each control on population, thus making performance questionable.
I hope I make sense. By the way, in terms of normal combo boxes and lists, I set the datasource property at run-time to a collection of records made in code and in regards to listview controls, I get a collection of records, and then go through them one by one in a For loop to put them into the grid, under the correct headers etc.
Look forward to your answers! :)
Regards,
VBM2
__________________
Kind regards,
Craig
|