Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get a datagrid value in c#

Status
Not open for further replies.

aolb

Programmer
Apr 16, 2002
180
GB
Sorry for the stupid question but I have been looking for a while to get the syntax.

What is the c# syntax for getting a value from a selected datagrid? the vb is "dg.Items.Item(1).Cells(20).Text
 
dg.Items.Item[1].Cells[20].Text; is what I had figured it out to be but I wasn't sure.

I am using ASP.NET 1.1 with C# and I am getting this message

should be somethig simple I've overlooked


c:\inetpub\ Reports\Menu.aspx.cs(93): 'System.Web.UI.WebControls.DataGridItemCollection' does not contain a definition for 'Item'
 
that's done the trick, it's easy when you know how

ta
 
Glad to help, but I really didn't know how.. in C# anyway. Those conversion sites work well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top