PC Review


Reply
Thread Tools Rate Thread

Datagrid Position Changed Bindings (Re-Post)

 
 
MadCrazyNewbie
Guest
Posts: n/a
 
      30th Mar 2004
Hello Group,

I have a problem with my bindings.

I use the following code to define my Postition changed for my ComboBox1:

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal
e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If Me.BindingContext(objdsAccess, "Users").Position <> -1 And Not
mlLoading Then
objdsAccess.Users.Rows(Me.BindingContext(objdsAccess,
"Users").Position).Item("AccessLevelID") = Me.ComboBox1.SelectedValue
End If
End Sub

Private Sub objdsAccess_PositionChanged()
If Me.BindingContext(objdsAccess, "Users").Position <> -1 Then
Me.ComboBox1.SelectedValue =
objdsAccess.Users.Rows(Me.BindingContext(objdsAccess,
"Users").Position).Item("AccessLevelID")
End If
Me.lblNavLocation.Text = (((Me.BindingContext(objdsAccess,
"Users").Position + 1).ToString + " of ") + Me.BindingContext(objdsAccess,
"Users").Count.ToString)
End Sub

The above works fine if I use it on my Nav buttons to Navigate for example:

Private Sub btnNavNext_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnNavNext.Click
Me.BindingContext(objdsAccess, "Users").Position =
(Me.BindingContext(objdsAccess, "Users").Position + 1)
Me.objdsAccess_PositionChanged()
End Sub

I`ve now added a Datagrid but when I move through the datagrid, it updates
all my Textboxs but my ComboBox1 never changes, it just sticks on the first
Item in the list

How do I get my ComboBox to change, when moving through My Datagrid?

Could somebody please point me in the right direction?

Many Thanks
MCN


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Exchange RPC bindings changed! I'm down! Peter Scott Microsoft Windows 2000 Security 2 27th Apr 2004 07:07 AM
Help! Exchange RPC bindings changed! I'm down! Peter Scott Microsoft Windows 2000 Active Directory 2 27th Apr 2004 07:07 AM
Help! Exchange RPC bindings changed! I'm down! Peter Scott Microsoft Windows 2000 Security 0 26th Apr 2004 04:19 PM
Help! Exchange RPC bindings changed! I'm down! Peter Scott Microsoft Windows 2000 Active Directory 0 26th Apr 2004 04:19 PM
Datagrid Postion Changed Bining Problem (Re-Post) MadCrazyNewbie Microsoft ADO .NET 0 30th Mar 2004 04:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:05 AM.