Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to read items in Datagrid using c#
Message
De
17/01/2005 01:59:11
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
WebForms
Titre:
How to read items in Datagrid using c#
Divers
Thread ID:
00977662
Message ID:
00977662
Vues:
64
Hi to all,

I have here a VB.Net Code that read all items from the Datagrid and get the
total.
   Dim total as Double
   For i = 0 To DataGrid1.Items.Count - 1
      total = total + Convert.ToDouble(DataGrid1.Items.Item(i).Cells(1).Text)
   Next
But in C#, it seems that I can't find the Item(i).Cells(1).Text property.

How do i convert this in C#.

Here is my code in C#
   for(int i=0; i<dg.Items.Count -1; i++)
      {				
	// Response.Write (dg.Items.Item(i).Cells(1).Text);
        // the above code has an error...
      }
Can anyone help?

Thanks.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform