Thiyaga Raja

Thiyaga Raja

  • NA
  • 5
  • 12.9k

DataGridview ,Textbox location(txtbox.Location= Grid.Location + Grid.GetCellDisplayRectangle(Grid.CurrentCell.ColumnIndex, Grid.CurrentCell.RowIndex,True))

Sep 8 2012 5:46 AM
1)textbox position,size will be render in every column of datagridview when navigating to one cell to another using c#.net(windows application)
 
2) DataGridview's every cell going to get input from this textbox (single textbox)only
 
3)For that textbox size, location must be render according to the currentcell of the datagridview
 

 
Private Sub show()
txtbox.Size=Grid.CurrentCell.Size
txtbox.Location= Grid.Location + Grid.GetCellDisplayRectangle(Grid.CurrentCell.ColumnIndex, Grid.CurrentCell.RowIndex,True)
txtbox.Visible= True
txtbox.Focus()
EndSub
 
By using the above vb.net code works fine and gives the output but not in c#.net.
Actually i am working with C#.net.
 

 
I need to do this task in c#.net
So Kindly convert it to c#.net
I tried a lot but i didn't get the solution..
Please help me.
Thanks in advance...