![](/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.