上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 37 下一页
摘要: <sdk:DataGridTemplateColumn Width="80"><sdk:DataGridTemplateColumn.CellTemplate><DataTemplate><Button Content="Delete" Click="DeleteButton_Click" /></DataTemplate></sdk:DataGridTemplateColumn.CellTemplate></sdk:DataGridTemplateColu 阅读全文
posted @ 2012-06-17 18:46 Ken-Cai 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Deleting the selected row(s) requires you to get the bound collection or collection view and enumeratethrough the SelectedItems property of the DataGrid, removing the corresponding item from the boundcollection/collection view. This is can be somewhat of a messy process due to removing items in anen 阅读全文
posted @ 2012-06-17 18:44 Ken-Cai 阅读(233) 评论(0) 推荐(0) 编辑
摘要: The final (and generally most user-friendly) method is to automatically maintain an empty row as thelast row in the DataGrid. The user can enter data for a new item in this row, and the DataGrid shouldautomatically add a new empty row once they do. Sadly, there is no built-in feature like this in th 阅读全文
posted @ 2012-06-17 18:42 Ken-Cai 阅读(218) 评论(0) 推荐(0) 编辑
摘要: the DomainDataSourceView class doesn’t have an Insert method, but if you have areference to the bound collection that does support this method (such as an ObservableCollection) andwant to insert a new row after the currently selected row, you can use the following codeObservableCollection<Product 阅读全文
posted @ 2012-06-17 18:32 Ken-Cai 阅读(626) 评论(0) 推荐(0) 编辑
摘要: DomainDataSourceView view = productDataGrid.ItemsSource as DomainDataSourceView;Product newProduct = new Product();view.Add(newProduct);// Scroll the first cell of the new row into view and start editingproductDataGrid.Focus();productDataGrid.SelectedItem = newProduct;productDataGrid.CurrentColumn = 阅读全文
posted @ 2012-06-17 18:29 Ken-Cai 阅读(115) 评论(0) 推荐(0) 编辑
摘要: bool hasChanges = ((Entity)ProductsDataForm.CurrentItem).HasChanges; 阅读全文
posted @ 2012-06-17 18:27 Ken-Cai 阅读(105) 评论(0) 推荐(0) 编辑
摘要: object element = FocusManager.GetFocusedElement(); 阅读全文
posted @ 2012-06-17 18:26 Ken-Cai 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 1. 要求: OOB, 而且要提升信任. dynamic excel = AutomationFactory.CreateObject("Excel.Application"); excel.Visible = true; excel.workbooks.Add(); dynamic sheet = excel.ActiveSheet; dynamic cell = null; int i = 1; foreach (AGC工程 c in dataGrid1.ItemsSource) { cell = sheet.Cells[i /*row*/, 1 /*col*/]; c 阅读全文
posted @ 2012-06-16 18:31 Ken-Cai 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 1. 视频 http://www.silverlight.net/learn/data-networking/data-controls/dataform-control 阅读全文
posted @ 2012-06-16 09:20 Ken-Cai 阅读(120) 评论(0) 推荐(0) 编辑
摘要: http://visualstudiogallery.msdn.microsoft.com/6a9f4f1a-579d-4a76-9d3a-70dd3339cfd6/ 阅读全文
posted @ 2012-06-16 07:34 Ken-Cai 阅读(189) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 37 下一页