Click here to Skip to main content
15,895,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi when I want select row in grid view for some parameters return to me ,I recive this error:

Error 1 Cannot implicitly convert type 'System.Web.UI.WebControls.TableCell' to 'string' C:\Users\venus\Documents\Visual Studio 2005\WebSites\income\Default.aspx.cs 19 26 C:\...\income\

WHY? Can any body help to me?
Posted
Comments
[no name] 18-Jul-12 13:04pm    
"WHY?"... just like it says. You are trying to convert a TableCell to a string.
Sandeep Mewara 18-Jul-12 13:12pm    
Share related coe snippet / stack trace.

1 solution

my code is:

Textbox1.Text = GridView2.Rows[GridView2.SelectedIndex].Cells[1];

but i recieve error????????????
 
Share this answer
 
Comments
[no name] 18-Jul-12 13:28pm    
And this is an answer? Try Textbox1.Text = GridView2.Rows[GridView2.SelectedIndex].Cells[1].Text;
veusk 18-Jul-12 14:22pm    
thanks alot

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900