Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create new row in dataset and move to it
Message
 
 
À
28/01/2010 17:13:36
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01446330
Message ID:
01446443
Vues:
23
>>>
>>>You need to create a row to be added:
>>>DataRow r = oMyDataSet.dtMyTable.NewRow()
>>> oMyDataSet.dtMyTable.Rows.Add(r);
>>
>>Thank you. Still I don't see the new record in the grid and in the textboxes (I suppose to see empty record and empty values in the textboxes). I am sure I am probably still missing something. What I have, after the code that creates and adds a new row - as you suggested, is call to MoveLast() in the bindingSource.
>
>Try something in the grid like (replace dataGrid1 with your grid object of course):
>
>dataGrid1.CurrentRowIndex = dtMyTable.Rows.Count - 1

I will give it a try. Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform