Another Datagrid thing

  • Thread starter Thread starter MadCrazyNewbie
  • Start date Start date
M

MadCrazyNewbie

Hey again Group,

Sorry to keep been a pain but ..............

I have the following code:

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

What would the Equivilant be if I wanted to use it in a Datagrid? I changed
Me.datagrid1.SelectedValue

But it error saying: D:\Test Apps\App1New\DataForm1.vb(558): 'SelectedValue'
is not a member of 'System.Windows.Forms.DataGrid'.

Could anybody possible help?

Many Thanks
MCN
 
Sorry Im confusing my self now (Not Hard)

Sorry it this code for my position changed:

If Me.BindingContext(objdsAccess, "Users").Position <> -1 Then
Me.DataGrid1.SelectedValue =
objdsAccess.Users.Rows(Me.BindingContext(objdsAccess,
"Users").Position).Item("AccessLevelID")
End If

But I think I need to change it for both bits of code, its the same error if
I change the above.

Many Thanks
Si
 
Back
Top