Resolved How to implement 'data view'

kpgraci

Active member
Joined
Feb 21, 2011
Messages
30
Location
New Orleans
Programming Experience
10+
I want to build a form with fields bound to a datasoruce that the user can scroll through (using the up and down arrows).

This would be a detail screen, but I don't really want a visible data gird or list on the screen with it, but as I'm still designing
this may be something I would want to try also.

The screen would be read-only data with a search textbox that would be used to query the list of data. The user will
enter a search term and then browse through the detail screen to locate the exact record they want.

I'm somewhat restricted on design because I'm trying to replicate a legacy program and don't want to deviate too far
from the original design.

For my datasource I've got a List (of MyClass), I just need to figure out the binding and navigation.

thx
 
Last edited:
resolved
when the data connection was created, the wizard also created a DataSet item in solution explorer, up till now I had not used it for anything

I opened the dataset from solution explorer, then drag a table from the db in the server explorer onto the designer surface

I added a label to my form, and selected properties

I expanded the label's DataBindings property, then expanded the Text property, then selected the data tables from the dataset under project data sources
this added a dataset, bindingsource, and tableadaptor to the form, and a fill command in page load.

I added a new query to the table adaptor with a parameters, this added a new method to the table adaptor allowing me to call this query with the search parameter

On my text box key up event I call the binding source .movenext and .moveprevious methods on the up and down arrows

works great...but...

<soapbox>
I really don't like the IDE doing all the work for me, I know this is going against all the trends, but I'm always befuddled with tutorials
that brag about how 'we did all this and did not have to write any lines of code!". I don't mind writing lines of code, if fact, I like
it. All this drag and drop nonsense hides things from me so I have no idea what's going on. Less like programming and more like
learning how to use the IDE. Is it just me? (that's retorical ;))
</soapbox>
 
Back
Top