开发者

C# wpf mvvm datagrid edit cells

When I edit a cell, I want to retrieve the content of that cell into 开发者_C百科a string object in my viewModel?

How do I do that?


If the editing is in datagrid than we could retrieve the item in the current cell by using a property.

The property is :

private <YourObject> datagridselectedItem;

public <YourObject> DatagridselectedItem
    {
        get { return datagridselectedItem; }
        set
        {
            datagridselectedItem = value;
            this.RaisePropertyChanged("DatagridselectedItem");
        }
    }

Let me know whether it is helpful to you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜