This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// Person | |
| /// </summary> | |
| private class Person | |
| { | |
| public int Id { get; set; } | |
| public string Name { get; set; } | |
| } | |
| /// <summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| string[][] array = new string[][] { new string[] { "a" }, new string[] { "b" }, new string[] { "c" } }; | |
| string[] select = array.Select(v => v[0]).ToArray(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ObservableCollection<Item> items = this.ListView.DataContext as ObservableCollection<Item>; | |
| selected.ToList().ForEach((s) => | |
| { | |
| Item item = items.Where((i) => i.Value == s.Value).SingleOrDefault(); | |
| if (item != null) | |
| { | |
| items.Remove(item); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String.Join(" ,", array) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dim band = Me.grdList.DisplayLayout.Bands(0) | |
| Dim setting As Infragistics.Win.UltraWinGrid.SummarySettings | |
| Dim startIndex = band.Columns(GridColumns.Gokei).Index | |
| Dim endIndex = band.Columns(GridColumns.Month10).Index | |
| For colIndex = startIndex To endIndex | |
| setting = band.Summaries.Add(Infragistics.Win.UltraWinGrid.SummaryType.Sum, band.Columns(colIndex)) | |
| setting.DisplayFormat = "{0:#,##0}" | |
| setting.Appearance.TextHAlign = Infragistics.Win.HAlign.Right | |
| Next |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Private Sub gridList_AfterCellUpdate(sender As Object, e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles gridList.AfterCellUpdate | |
| Dim total = Enumerable.Range(1, 12). | |
| Sum(Function(i) e.Cell.Row.Cells(i).Value) | |
| Me.ds.Rows(e.Cell.Row.Index).SetCellValue(GridColumns.Total, total) | |
| End Sub |
NewerOlder