开发者

Help with rows in a datagrid

开发者 https://www.devze.com 2023-02-01 03:13 出处:网络
I have a problem. 开发者_开发百科I have an app that allows you to right click on a row in the datagrid and a menu item pops up that lets you copy, move, or delete the row. When i click on one of these

I have a problem. 开发者_开发百科I have an app that allows you to right click on a row in the datagrid and a menu item pops up that lets you copy, move, or delete the row. When i click on one of these options, I get a nullReferenceException. When i step through, I am getting a null value on qv.Name. Anyone got any ideas? Also, let me know if you need more code. Thanks.


From your code, I think you want:

QuarantineViewDS.QuarantineViewRow qv = 
    dgSystemView.SelectedItem as QuarantineViewDS.QuarantineViewRow;

instead of:

QuarantineView qv = dgSystemView.SelectedItem as QuarantineView;
0

精彩评论

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

关注公众号