提前致谢!-苏塔 解决方案 使用 DataGrid.SelectedItem 属性 获取绑定到所选行的数据.I've got a DataGrid that I'm populating with data, and I'd like to copy the value of the cell clicked on into a string. Better yet, I'd like to copy the value out of a specific cell in the row, so if there's a way to load the entire row into an array that'd be better.For instance I'd have a few rows like this:Included | Keyword | Occurrences | Density------------------------------------------------ Yes | KW1 | 3 | 1.02% Yes | Keyword2 | 1 | 0.25% Yes | KW1 | 3 | 1.021%If I were to click anywhere on row 2 I'd like to be able to load the row into an array so that it I'd be able to call gridrow[1] in order to consistently get the value "Keyword2".Also:In the older Silverlights, to open up a new webpage I'd use HtmlPage.Navigate, but that doesn't appear to work in Silverlight 4. (Yes, I've loaded System.Windows.Browser; )Thanks in advance!-Sootah 解决方案 Use the DataGrid.SelectedItem Property to get the data bound to the selected row. 这篇关于Silverlight C# - 如何获取在 DataGrid 中单击的行/单元格的值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-18 03:12