Click here to Skip to main content
15,887,328 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I want to move the textbox to lastrow in first column of gridview. When I try to enter something only in lastrow in firstcolumn of gridview, the textbox should be visible and the entered text should fall on textbox. Moreover I don't want to edit the records fetched from database so thats why I made all columns to read-only.

Please suggest me a solution.
Posted
Updated 26-Nov-10 0:35am
v2
Comments
Sandeep Mewara 26-Nov-10 6:32am    
What have done far? What kind of suggestion you are expecting here?
krishna kishore58 26-Nov-10 7:03am    
iam unable to move or place textbox at last row first column... so that when i try to enter something the entered text falls on textbox and i can do further activities. Moreover i dont want to edit the records fetched from database and for that i made read-only to gridview...
ShaktisinhRathod 26-Nov-10 7:12am    
hi,
what is your actual requirement?

1 solution

You can add a dummy record as "last record"
todo so - remove the data bindings - use a DataTable or any container with your data - not a direct reader or something to the db.
as you are only interested in read-only mode.

DataGridView.Rows.Add(); or something.

When The display looks a-ok.
You can enforce a non-readonly on the grid - then select your own validation on cell enter event of the datagridview.

if the cell the user is "adding" text - and the row is not "max" - return;

otherwise add the text to the cell / textbox.

Regards,
Chris
 
Share this answer
 

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