Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stuck without Navigation
Message
De
10/03/2005 17:25:13
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
 
 
À
10/03/2005 16:58:41
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
00994596
Message ID:
00994664
Vues:
15
Joe,

Don't think this is as much a binding issue, as it is that you're trying to plug into framework code, so you need to do it the "framework way."

If you look at the framework event handler code you're trying to use, it eventually looks for a datarow from which to gather the primary key value you need for your method -- that's how e.PrimaryKeyValue gets populated.

Check out CallStateChange method again... it has a few overloads, of which one has the following signature:

CallStateChange(mmBusinessState bizState, string tableName, DataRow dr)

dr can be any datarow that contains the same primary key column (with the same field name) as oCompanyList.PrimaryKey property and PK value you want passed to the statechange handler.

Hope that makes sense,
---J

>That was useful to understand how I can manually raise these events....
>However, aparantly I am not really navigating the data as I presumed previously.
>
>I just tried the following
>
>    Private Sub CompanySelectionUltraCombo_ValueChanged _
>    (ByVal sender As Object, ByVal e As System.EventArgs) _
>    Handles CompanySelectionUltraCombo.ValueChanged
>
>        Dim companySelectedRowIndex As Integer = _
>            Me.CompanySelectionUltraCombo.SelectedRow.Index
>        Me.BindingContext.Item(oCompanyList).Position() = companySelectedRowIndex
>        Me.oCompanyList.CallStateChange(mmBusinessState.Navigated)
>
>    End Sub
>
>
>When the state change was called it correctly called my Business Object's HookParentNavigated HOWEVER, the value of e.PrimaryKevValue is not changing to match the value selected in the ComboBox.
>
>    ' Parent Navigated hook method
>    Protected Overrides Sub HookParentNavigated _
>    (ByVal bizObj As mmBusinessObject, ByVal e As mmBusinessStateChangeEventArgs)
>        Me.GetCompanyByCompanyId(e.PrimaryKeyValue)
>    End Sub
>
>
>I am apartently missing a binding process somewhere...
>Do I have to rebind the control after the selected index changes or what else should I consider?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform