Jan 4, 2008 #1 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
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
Jan 4, 2008 #2 jbenson001 Programmer Jan 7, 2004 8,172 US dg.Items.Item[1].Cells[20].Text; There are many online conversion tools available: http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspxhttp://www.carlosag.net/Tools/CodeTranslator/Default.aspx Upvote 0 Downvote
dg.Items.Item[1].Cells[20].Text; There are many online conversion tools available: http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspxhttp://www.carlosag.net/Tools/CodeTranslator/Default.aspx
Jan 4, 2008 Thread starter #3 aolb Programmer Apr 16, 2002 180 GB 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\http://wwwroot\Reconciliation Reports\Menu.aspx.cs(93): 'System.Web.UI.WebControls.DataGridItemCollection' does not contain a definition for 'Item' Upvote 0 Downvote
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\http://wwwroot\Reconciliation Reports\Menu.aspx.cs(93): 'System.Web.UI.WebControls.DataGridItemCollection' does not contain a definition for 'Item'
Jan 4, 2008 #4 jbenson001 Programmer Jan 7, 2004 8,172 US try: dg.Items[1].Cells[20].Text; Upvote 0 Downvote
Jan 4, 2008 Thread starter #5 aolb Programmer Apr 16, 2002 180 GB that's done the trick, it's easy when you know how ta Upvote 0 Downvote
Jan 4, 2008 #6 jbenson001 Programmer Jan 7, 2004 8,172 US Glad to help, but I really didn't know how.. in C# anyway. Those conversion sites work well. Upvote 0 Downvote