![](/img/trans.png)
[英]How to get the contents of the first cell of a row when double clicked on any column of a row in C# DataGrid
[英]Silverlight C# - How to get value of row/cell clicked on in DataGrid?
我有一个要填充数据的DataGrid,我想将单击的单元格的值复制到字符串中。 更好的是, 我想从该行的特定单元格中复制值,因此,如果有一种方法可以将整个行加载到一个更好的数组中 。
例如,我将有几行是这样的:
Included | Keyword | Occurrences | Density
------------------------------------------------
Yes | KW1 | 3 | 1.02%
Yes | Keyword2 | 1 | 0.25%
Yes | KW1 | 3 | 1.021%
如果我要在第2行的任意位置单击,我希望能够将该行加载到数组中,以便能够调用gridrow [1]以便始终获得值“ Keyword2”。
另外 :
在较旧的Silverlights中,要使用HtmlPage.Navigate打开一个新网页,但在Silverlight 4中似乎不起作用。(是的,我已经加载了System.Windows.Browser;)
提前致谢!
-Sootah
使用DataGrid.SelectedItem属性获取绑定到所选行的数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.