Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to read items in Datagrid using c#
Message
From
17/01/2005 01:59:11
 
 
To
All
General information
Forum:
ASP.NET
Category:
WebForms
Title:
How to read items in Datagrid using c#
Miscellaneous
Thread ID:
00977662
Message ID:
00977662
Views:
63
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.
Next
Reply
Map
View

Click here to load this message in the networking platform