c# - How can I put data from my datagridview to textboxes? -


what want when select row of data in database, go textbox. example data in column "title" go textbox1 , data in column "isbn" go textbox2. haven't edit properties in properties window of datagridview. can me?

you have this:

yourtextbox.text = yourdatagridview.selectedrows[0].cells["title"].value.tostring(); yourtextbox2.text = yourdatagridview.selectedrows[0].cells["isbn"].value.tostring(); 

edit: assume have selected row on datagrid. i´m sorry mistake, cells property instead of columns

hope helps.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -