Edit a cell in DataGrid

P

Pranav Shah

I have a Windows DataGrid with 6 columns.
The DataSource is a DataTable that gets populated based on user request.
Column 5 & 6 are Expression columns based on Columns 1 & 2 and Columns 3
& 4 repectively.

In the DataGrid I wanto do a few things.
1)Allow user to modify columns 3 - 6.
2)When the user is editing a column he can press Enter or Tab and the
change will be accepted. At this moment the user needs to click on a
different column or different object.
3)I can make edit Columns 5 & 6 but as soon as I loose focus my chages
are not accepted and only the Expression value is acceped.

Any help is appreciated. Thanks.
 
D

Dmitriy Lapshin [C# / .NET MVP]

Pranav,

To the best of my knowledge, ASO .NET does not support columns which would
have some cells calculated and some containing raw values. Columns can only
be FULLY calculated. Therefore the DataGrid cannot update values in such
columns and reverts to the original value immediately.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top