Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Hi, im playing with textbox on gridview. when i select a cell im able to locate the textbox at that position by setting the left and top positions of textbox... But the issue is when i scroll the gridview im unable to move the textbox along with gridview...In the sense the problem is with textbox left assigning...

INITIALLY...
C#
txtValueChange.Left = dataGridView1.Left + dataGridView1.ColumnHeadersHeight+8+ dataGridView1.Columns[0].Width;


THEN IM INCREMENTING THE LEFT POSITION.

I CAN ABLE TO RESOLVE THE ISSUE IF GET THE SELECTED CELL LEFT POSITION BUT IM UNABLE TO...
C#
txtValueChange.Left += dataGridView1.Columns[j].Width;


Don't shout! We can hear you fine enough!
Posted
Updated 30-Nov-10 17:10pm
v5
Comments
Sunasara Imdadhusen 30-Nov-10 0:18am    
Please use PRE tag to more readability and code formatting
krishna kishore58 30-Nov-10 0:21am    
k, can u suggest me answer for above question
Toli Cuturicu 30-Nov-10 6:29am    
DON'T SHOUT!
Dave Kreskowiak 30-Nov-10 10:07am    
Why are you even doing this? The DataGridViewTextBoxColumn already supplies this for entering data in a cell.
krishna kishore58 30-Nov-10 23:12pm    
s i know but i could not able to handle... Can u provide me that code clearly pls....

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