Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Refresh Form?
Message
De
06/09/2005 14:01:49
 
 
À
06/09/2005 12:25:40
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01046996
Message ID:
01047109
Vues:
8
Hi Bonnie,
Thanks for your reply.. it is important note.. I did't know it before.
Thanks


>Actually, Denis, your problem is with your DataBinding. There are two ways (two different syntaxes) to specify databinding for any control and this results in two distinct binding objects. The problem is that you can't mix and match ... you have to stay consistent throughout the form.
>
>So, in other words, since you bound your DataGrid with:
>
>        Me.DataGrid1.DataSource = pmks_dataset
>        Me.DataGrid1.DataMember = "vbestbuy"
>
>Then you have to use the following syntax with TextBoxes:
>
>        Me.txtDecrypt.DataBindings.Add(New Binding("text", pmks_dataset, "vbestbuy.einst_prs"))
>
>Instead of what you used:
>
>        Me.txtDecrypt.DataBindings.Add(New Binding("text", pmks_dataset.Tables("vbestbuy"), "einst_prs"))
>
>
>But if you had bound your grid with:
>
>this.oGrid.DataSource = pmks_dataset.Tables("vbestbuy")
>
>Then you use the syntax you were using for TextBoxes:
>
>        Me.txtDecrypt.DataBindings.Add(New Binding("text", pmks_dataset.Tables("vbestbuy"), "einst_prs"))
>
>Do you see the difference? See my .NET Tips column in the current issue of the UT Magazine (www.utmag.com).
>
>~~Bonnie
>
>
>
>
>>Hi,
>>Easy question.. but...
>>I have a form with DATAGRID and TEXTBOX.
>>I'd like to skip DATAGRID records and refresh textbox.
>>DataGrid has not events like AfterRowColChange... then
>>I try to use CurrencyManager to insert CurrencyManager.Refresh.. but PositionChanged and CurrentChanged events not fire when I changing records in DataGrid... textbox still has value of first record..
>>Which event fires when I change row in DataGrid? and how to update other controls on form
>>
>>
>>Some code :
>>
>>
>>        pmks_dataset = New DataSet
>>        Me.OleDbDataAdapter1.Fill(pmks_dataset, "vbestbuy")
>>        Me.OleDbDataAdapter1.SelectCommand.Connection.Close()
>>        pmks_manager = CType(Me.BindingContext(pmks_dataset.Tables("vbestbuy")), CurrencyManager)
>>        Me.DataGrid1.DataSource = pmks_dataset
>>        Me.DataGrid1.DataMember = "vbestbuy"
>>        Me.txtDecrypt.DataBindings.Add(New Binding("text", pmks_dataset.Tables("vbestbuy"), "einst_prs"))
>>        pmks_manager.Position = 0
>>        AddHandler pmks_manager.PositionChanged, AddressOf Me.PositionChanged
>>        AddHandler pmks_manager.CurrentChanged, AddressOf Me.CurrentChanged
>>
>>
>>
>>Please help.
>>THanks
>>Denis.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform