0

I have created a class "student" and made an array which contains students. I would not only like to display the array in a datagridview, but the array should also be updated if the user makes changes to one of the students in the datagridview.

I succeeded in showing the array in the dgv: one way is using datasource prop, the other is doing is diagrammatically. However, i can't find out how to let the user edit the array by editing the dgv.

Anybody know how to do this?

1 Answer 1

1

If the grid is not read only,and the data is bound from the datasource property,any value displayed should be editable if you double click it

Sign up to request clarification or add additional context in comments.

11 Comments

the program starts with an empty (0 to 19) array. the datasource property for the dgv is the empty array. what i see when i run the program is an empty 5*20 table which is ok. but when i type some value in one of the cells and i want to move on to the next cell, the data in the first cell disappears
you can find (and edit) code i used here: LINK TO GOOGLE DRIVE
These conditionsa should apply: The EditMode property value is not EditProgrammatically. The ReadOnly properties of the cell, row, column, and control are all set to false.,do they? check in the designer
i didnt change these props. if i would set editmode to programmatically, the user wouldnt be even able to type text in the datagrid.
i dont see any readonly props for cells, rows or columns... editmode is ok and readonly for the dgv also ok
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.