Advice needed on best practices approach using dataset/BindingSource

shalan99

Active member
Joined
Jun 1, 2007
Messages
32
Programming Experience
Beginner
Hi again everyone,

I need some advice please...I am using a strongy-typed dataset in my vb 2005 winforms app, and I have a datagridview that is bound to a bindingsource. I have various controls on the page that alter the dataset and hence the content of the datagridview.

What I also have are labels below the grid, that I intend to use to display text based on various values in the dataset (example: 1 label to show a count of how many rows display "false" for a certain column, and another label to count for how many "true", etc., etc.)

My question is, what is the preferred method or best practices approach that I can employ to accomplish this requirement? I need for the labels also to dynamically refresh as values change in the dataset.

Would a DataView/DataViewManager suffice? Please may I ask that someone merely guide me in the right direction. I am still learning to develop WinForms apps, so I want to ensure that I thoroughly understand any solution that u guys/gals may suggest!

Thank U!

cheers
Shalan
 
Last edited:
What I also have are labels below the grid, that I intend to use to display text based on various values in the dataset (example: 1 label to show a count of how many rows display "false" for a certain column, and another label to count for how many "true", etc., etc.)
Add Column CountXXXIsTrue
Set its expression to Sum(Iif(Column, 1, 0))

Add Column CountXXXIsFalse
Set its expression to Sum(Iif(Column, 0, 1))


My question is, what is the preferred method or best practices approach that I can employ to accomplish this requirement? I need for the labels also to dynamically refresh as values change in the dataset.
Expression

http://msdn2.microsoft.com/en-us/library/system.data.datacolumn.expression(vs.80).aspx
 
Back
Top