Click here to Skip to main content
15,939,065 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I am new to WPF and need help in manipulating my Gridview.

The below line fills my datagrid with a list returned from the method LoadPSVGrid().
dgPointSpeedVector.ItemsSource = LoadPSVGrid();

Now my issue is, I want a specific column(or 2) in the grid to allow user to edit.

Let the columns be Name, Course, Dept, Address.

I want to allow the user to modify Course and Dept (and if possible to reflect the change in my DB, as of now I am not sure about the DB part of it).

Updated 22-Dec-11 1:09am

1 solution

BeginEdit method of DataGrid class, helps you to make each cell in customized edit mode. Ref at:[^]

Herez the sample code in Load handler:

dgPointSpeedVector.CurrentCell = new DataGridCellInfo(
    dgPointSpeedVector.Items[0], dgPointSpeedVector.Columns[3]);
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