datagrid

WPF XAML Trying to bind the Width of a DataGrid Column

ぃ、小莉子 提交于 2019-12-25 05:09:37
问题 I'd like to bind the Width of my Columns to a Property in my Model so I can save it if the user resize it. I'd like a solution with no code behind. This is what I have so far: XAML: <DataGrid x:Name="dgArticles" AutoGenerateColumns="False" ItemsSource="{Binding Specifications.Articles}" RowDetailsVisibilityMode="Visible"> <DataGrid.Columns> <DataGridTextColumn x:Name="Number" Header="Number" Binding="{Binding Number}" Width="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=

DataGrid grouping doesn't update on change in CollectionViewSource

天大地大妈咪最大 提交于 2019-12-25 05:08:12
问题 I have a CollectionViewSource CollectionOfVideos bound to ObservableCollection ListOfVideos . That CollectionViewSource is the ItemsSource for the DataGrid dataGrid_Video . I've implemented a grouping by lShortName of label of ListOfVideos . When items are added to DataGrid, grouping seems to work, because it groups all added items by their default label . Problem is, grouping doesn't update when label of item is changed. Here's my code: Window.Resources in MainWindow.xaml

columns are not coming in order like in xml to datagrid

守給你的承諾、 提交于 2019-12-25 05:05:30
问题 My webapplication is giving XML in following format: <Vendor name="Infosys Limited" adopTotal="120" totalstrength="775" FY10Q1="162" FY10Q2="132" FY10Q3="229" FY10Q4="254" FY11Q1="282" FY11Q2="243" FY11Q3="238" FY11Q4="233" FY12Q1="237" FY12Q2="136" FY12Q3="101" FY12Q4="120"/> <Vendor name="Wipro" adopTotal="42" totalstrength="1181" FY10Q1="9" FY10Q2="12" FY10Q3="53" FY10Q4="67" FY11Q1="85" FY11Q2="76" FY11Q3="84" FY11Q4="82" FY12Q1="98" FY12Q2="51" FY12Q3="39" FY12Q4="42"/> <Vendor name=

Bind Objects with generic list to wpf datagrid

天大地大妈咪最大 提交于 2019-12-25 04:58:05
问题 I like to display my data objects: class DataElement { public string name { get; set; } public List<customProperty> properties { get; set; } } class customProperty { public String value; public String definition; } in a datagrid like: Name | dataElementList[0].properties[0].definiton | dataElementList[0].properties[1].definiton | dataElementList[0].properties[2].definiton | ... --------------------------------------------------------------------------------------------------------------------

Value cannot be null. Parameter name: control

前提是你 提交于 2019-12-25 04:56:10
问题 <cc1:ConfirmButtonExtender DisplayModalPopupID="ModalPopupExtender4" ID="ConfirmButtonExtender4" runat="server" TargetControlID="lnkremoveloc" Enabled="False" OnClientCancel="RemoveLocations"> </cc1:ConfirmButtonExtender> <cc1:ModalPopupExtender ID="ModalPopupExtender4" OkControlID="btnDisable" CancelControlID="btnCancel" BackgroundCssClass="modalBackground" PopupControlID="pnlRemove" TargetControlID="lnkremoveloc" runat="server"> </cc1:ModalPopupExtender> <asp:Panel CssClass="modalPopup" ID=

Value cannot be null. Parameter name: control

时间秒杀一切 提交于 2019-12-25 04:56:08
问题 <cc1:ConfirmButtonExtender DisplayModalPopupID="ModalPopupExtender4" ID="ConfirmButtonExtender4" runat="server" TargetControlID="lnkremoveloc" Enabled="False" OnClientCancel="RemoveLocations"> </cc1:ConfirmButtonExtender> <cc1:ModalPopupExtender ID="ModalPopupExtender4" OkControlID="btnDisable" CancelControlID="btnCancel" BackgroundCssClass="modalBackground" PopupControlID="pnlRemove" TargetControlID="lnkremoveloc" runat="server"> </cc1:ModalPopupExtender> <asp:Panel CssClass="modalPopup" ID=

Highlighting a DataGrid row in Flex based on an IF Statement

馋奶兔 提交于 2019-12-25 04:53:14
问题 I have a series of DataGrids which will pull data in from a query regularly. I want to highlight an entire row if a specified value in one column of that row is above a certain threshold. So I need to be able to parse through every row in a DataGrid and highlight any row that has a specific value above "100" say. The amount of data in the DataGrids is going to vary and there's no guarantee there will be any at times. Thanks 'override protected function updateDisplayList(unscaledWidth:Number

Silverlight Datagrid: Highlight an entire Column?

天大地大妈咪最大 提交于 2019-12-25 04:49:06
问题 I have a DataGrid in my Silverlight application, and would like to "highlight" an entire column when any cell in that column is selected. E.g., given this grid (where " [ ] " represents a cell): [ ][ ][ ] [ ][ ][ ] [ ][ ][ ] If I select a cell, like this [ ][ selected ][ ] [ ][ ][ ] [ ][ ][ ] I would like all the cells in that column, including the selected cell, to be "highlighted" (can be as simple as just changing the background color): [ ][ selected ][ ] [ ][ highlighted ][ ] [ ][

How to Count Duplicates in Datagridview in C#

邮差的信 提交于 2019-12-25 04:22:08
问题 how to do it? I've fount this code in How to Count Duplicates in List with LINQ : var list = new List<string> { "a", "b", "a", "c", "a", "b" }; var q = from x in list group x by x into g let count = g.Count() orderby count descending select new { Value = g.Key, Count = count }; foreach (var x in q) { MessageBox.Show("Value: " + x.Value + " Count: " + x.Count); } But how to modify it to count duplicates in datagridview? For example datagridview1[7,i] where i is number of rows in datagriview.

How to Count Duplicates in Datagridview in C#

醉酒当歌 提交于 2019-12-25 04:22:08
问题 how to do it? I've fount this code in How to Count Duplicates in List with LINQ : var list = new List<string> { "a", "b", "a", "c", "a", "b" }; var q = from x in list group x by x into g let count = g.Count() orderby count descending select new { Value = g.Key, Count = count }; foreach (var x in q) { MessageBox.Show("Value: " + x.Value + " Count: " + x.Count); } But how to modify it to count duplicates in datagridview? For example datagridview1[7,i] where i is number of rows in datagriview.