Click here to Skip to main content
16,008,075 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Problem With Script Pin
Dave Kreskowiak26-Aug-04 2:53
mveDave Kreskowiak26-Aug-04 2:53 
GeneralRe: Problem With Script Pin
Anonymous27-Aug-04 0:08
Anonymous27-Aug-04 0:08 
Generalneed help! :( Pin
Member 90460525-Aug-04 15:04
Member 90460525-Aug-04 15:04 
GeneralRe: need help! :( Pin
Anonymous25-Aug-04 15:26
Anonymous25-Aug-04 15:26 
QuestionHow do I access URL from within the code in VB(not .NET) Pin
JM9325-Aug-04 13:46
JM9325-Aug-04 13:46 
AnswerRe: How do I access URL from within the code in VB(not .NET) Pin
Anonymous25-Aug-04 16:02
Anonymous25-Aug-04 16:02 
Questiondata between grids??? Pin
mittalpa25-Aug-04 12:35
mittalpa25-Aug-04 12:35 
AnswerRe: data between grids??? Pin
Jim Matthews26-Aug-04 5:04
Jim Matthews26-Aug-04 5:04 
hi pj,

this is actually pretty simple to do. from your single dataset create two dataviews.

dim dvMembers as new Dataview(myDataset.Tables("myTable"))

Dim dvNonMembers as New Dataview(myDataset.Tables("myTable"))

'set the rowfilter for each view

dvMembers.RowFilter = "IsGYMMember='Y'"
dvNonMembers.RowFilter = "IsGYMMember='N'"

membersDataGrid.DataSource = dvMembers
nonMembersDataGrid.DataSource = dvNonMembers

next, for each of your grids you'll want to create a tablestyle and set the MappingName property equal to your datatable name (not dataset, but datatable)

then add a few GridColumnStyles to the ColumnStyles collection of your TableStyle property.

create one DataGridTextBoxColumn and one DataGridCheckBoxColumn (i forget the actual name of these offhand, but you should be able to figure it out as you're going through, if not just let me know)

set the mapping name for your textboxcolumnstyle to "FullName" and the mapping name for your CheckBoxColumnStyle to "IsGYMMember".

a suggestion i'd make here is to change the IsGYMMember datatype to boolean. this will make for a more intuitive exchange of the data between the underlying datasource and display. But if you don't want to do that, at this point set the TrueValue of the CheckBoxGridColumn to 'Y' and the FalseValue of the CheckBoxGridColumn to 'N'. If you switch the datatype of the underlying column in the datasource this step is not necessary.

Remember that you should do this for each grid so that the data from each of the views is displayed properly.

next, when some one needs to be added to the members list you can have a button to change the IsGYMMember value in the corresponding datatable row to 'Y'. this is the approach i would take if you're working with two grids. you could also have a single grid and just allow the user to check and uncheck the checkbox columns to manipulate the datasource. i don't like the idea of having the user click the checkbox and the entire datarow moving to the other grid. but that's just my opinion.

hope this helps,



-jim
GeneralRe: data between grids??? Pin
mittalpa27-Aug-04 8:46
mittalpa27-Aug-04 8:46 
GeneralRe: data between grids??? Pin
Jim Matthews27-Aug-04 8:49
Jim Matthews27-Aug-04 8:49 
GeneralRe: data between grids??? Pin
mittalpa27-Aug-04 9:11
mittalpa27-Aug-04 9:11 
GeneralRe: data between grids??? Pin
Jim Matthews27-Aug-04 9:14
Jim Matthews27-Aug-04 9:14 
GeneralParse sql query without executing Pin
tocheng00525-Aug-04 11:39
susstocheng00525-Aug-04 11:39 
GeneralRe: Parse sql query without executing Pin
Anonymous25-Aug-04 17:19
Anonymous25-Aug-04 17:19 
GeneralRe: Parse sql query without executing Pin
tocheng00525-Aug-04 19:44
susstocheng00525-Aug-04 19:44 
GeneralRe: Parse sql query without executing Pin
Anonymous26-Aug-04 6:36
Anonymous26-Aug-04 6:36 
GeneralRe: Parse sql query without executing Pin
tocheng00526-Aug-04 11:52
susstocheng00526-Aug-04 11:52 
GeneralPropertygrid and dropdownlist from Database Pin
David M J25-Aug-04 11:32
David M J25-Aug-04 11:32 
General.MAT files from Visual Basic (Again) Pin
murphypa25-Aug-04 10:34
murphypa25-Aug-04 10:34 
GeneralRe: .MAT files from Visual Basic (Again) Pin
Anonymous25-Aug-04 12:00
Anonymous25-Aug-04 12:00 
GeneralRe: .MAT files from Visual Basic (Again) Pin
murphypa26-Aug-04 3:51
murphypa26-Aug-04 3:51 
GeneralRe: .MAT files from Visual Basic (Again) Pin
Anonymous26-Aug-04 9:24
Anonymous26-Aug-04 9:24 
GeneralRe: .MAT files from Visual Basic (Again) Pin
Colin Angus Mackay25-Aug-04 23:03
Colin Angus Mackay25-Aug-04 23:03 
GeneralRe: .MAT files from Visual Basic (Again) Pin
murphypa26-Aug-04 3:47
murphypa26-Aug-04 3:47 
GeneralRe: .MAT files from Visual Basic (Again) Pin
Colin Angus Mackay26-Aug-04 12:15
Colin Angus Mackay26-Aug-04 12:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.