Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, how verify spcell cell in c#? this is my vb code.its work.

VB
Dim i, j As Integer 
i = DataGridView1.CurrentRow.Index
TextBox1.Text = DataGridView1.Item(0, i).Value + DataGridView1.Item(0, j).Value 


any guy have idea for my project in c#? or conver this to c#? pls
Posted
Updated 24-Feb-12 19:14pm
v4
Comments
ZurdoDev 24-Feb-12 13:57pm    
Can you explain your question better? You just want to convert to C#? There are many tools online to do that and with a couple of lines of code it would be very easy, if that is what you want.
Varun Sareen 25-Feb-12 0:38am    
what is the problem you are facing be more clear, Please
Aniket Yadav 25-Feb-12 1:22am    
What is the value of integer j here.
The question is incomplete. Please elaborate more what you exactly want to do here.
Amal anjula 25-Feb-12 1:33am    
Collapse | Copy Code
Dim iAs Integer
i = DataGridView1.CurrentRow.Index
TextBox1.Text = DataGridView1.Item(0, i)
.Value
um try online convertes.but there error when convert.
ProEnggSoft 25-Feb-12 3:03am    
Please try solution 2.

You can use the following code

C#
int i,j;
i = DataGridView1.CurrentRow.Index;
TextBox1.Text = DataGridView1[0,i].Value + DataGridView1[1,i].Value;


The above code gives the value in the First and Second cell of the current row.
 
Share this answer
 
Amal anjula wrote:
conver this to c#?


Here

http://converter.telerik.com/[^]

you can convert C# to VB and VB to C#

I think this may be helpful to you


PES
 
Share this answer
 
v2

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