datagrid

Datagrid. I Can't refresh field

断了今生、忘了曾经 提交于 2019-12-24 04:18:41
问题 I can't refresh a field in my datagrid. This is my datagrid <DataGrid ItemsSource="{Binding Dati_Viaggio}" SelectedItem="{Binding SelectDati_Viaggio}" Style="{DynamicResource ST_DataGrid}" CellStyle="{DynamicResource St_DataGridCellStyle}" SelectionMode="Single" Name="Dg_Dati" IsReadOnly="True" RowDetailsVisibilityMode="VisibleWhenSelected" > this is the filed in datagrid that I want to refresh <DataGridTextColumn x:Name="col_NumOrd" Binding="{Binding Path=NumOrd}" Header="Num. Ord." Width=

Export DataGridView Data with Images into Excel, HTML, or Word with Proper Table Formatting

自闭症网瘾萝莉.ら 提交于 2019-12-24 04:14:06
问题 I have a data grid view with images loaded into it. The table which is the source for this data grid has path for images and I load images using that path. I have tried to export data to Excel and was successful, but it seems to show some problems with images. Please any help? Any help instead of Excel, HTML, or Word or anything would do, but please provide detailed help or it causes a lot of problems. Here is the code I used to export to Excel: saveFileDialog1.Filter = "Excel (*.xls)|*.xls";

Lots of unexpected “Cannot retrieve value using the binding” errors

会有一股神秘感。 提交于 2019-12-24 04:11:13
问题 When debugging my wpf project I see a lot of binding errors logged in the output window like this one: System.Windows.Data Information: 10 : Cannot retrieve value using the binding and no valid fallback value exists; using default instead. BindingExpression:Path=AreRowDetailsFrozen; DataItem=null; target element is 'DataGridDetailsPresenter' (Name=''); target property is 'SelectiveScrollingOrientation' (type 'SelectiveScrollingOrientation') I googled a lot about this kind of message and tried

Lots of unexpected “Cannot retrieve value using the binding” errors

﹥>﹥吖頭↗ 提交于 2019-12-24 04:11:12
问题 When debugging my wpf project I see a lot of binding errors logged in the output window like this one: System.Windows.Data Information: 10 : Cannot retrieve value using the binding and no valid fallback value exists; using default instead. BindingExpression:Path=AreRowDetailsFrozen; DataItem=null; target element is 'DataGridDetailsPresenter' (Name=''); target property is 'SelectiveScrollingOrientation' (type 'SelectiveScrollingOrientation') I googled a lot about this kind of message and tried

How to generate and bind a column for each item in the collection property of items used as DataGrid's ItemsSource

久未见 提交于 2019-12-24 03:22:25
问题 The items source of my data grid is a collection of objects like: Public Property Quarter As Integer Public Property MyColumns() As New List(Of MyColumn) Now I want to have a grid binding in a way that my resulting grid looks like -- Quarter -- Column1 -- Column2 -- Column3 .... ColumnX All items in datasource will have same MyColumns. Is there a way by which I can bind a collection to grid columns ? 回答1: Here is the solution. It is not the prettiest or the easiest but it is quite

How to display data from related tables in a WPF datagrid

拜拜、爱过 提交于 2019-12-24 03:14:11
问题 I'm just finding my way with WPF/Datagrid/Linq and I'm trying to find out how to display data from a related table in my datagrid. For example I have 3 tables: Customers: id, name Products: id, name Orders: id, customerId, productId and I've set up the relations in the DB tables. I've added the tables as a C# DataSet which has created my wrapper classes. I now want to bind a query to a couple of different WPF datagrids to obtain the following: list of orders as | Order Id | Product name |

placing a text box inside the silverlight data grid column header

陌路散爱 提交于 2019-12-24 02:33:18
问题 how to add a text box inside the silverlight data grid column header? so that i can use the text boxes for the filteration purpose? 回答1: <sdk:DataGridTextColumn.Header> <TextBox Text="{Binding YourTargetProperty}"/> </sdk:DataGridTextColumn.Header> The following article deals with the Filtering and Sorting. http://www.codeproject.com/Articles/83906/Silverlight-4-Datagrid-Sorting-Grouping-Filtering-.aspx 来源: https://stackoverflow.com/questions/4022753/placing-a-text-box-inside-the-silverlight

Freeze Columns from right to left

ぐ巨炮叔叔 提交于 2019-12-24 02:32:33
问题 I have a data grid in which I need to freeze the rightmost column. It is no problem to freeze the columns from left to right with the FrozenColumnCount property. Does anyone of you know how to do this? Thx in advance, TJ 回答1: There is no way to Freeze a column to the right if you want the others to scroll. If this functionality is critical to your app I would suggest investigating the third party Silverlight grid controls on the market e.g. Telerik, Infragistics etc 来源: https://stackoverflow

Add combobox to datagrid that is linked to a datable

為{幸葍}努か 提交于 2019-12-24 02:23:54
问题 My program is a WPF application written in VB.net. I accept answers geared toward C# as well, as I should be able to understand and/or convert. I have a dataTable that I fill with data from my MySQL database via MySqlDataAdapter. My dataGrid currently has AutoGenerateColumns="TRUE". I load my dataTable data into my dataGrid by DataGrid1.ItemsSource = MyDataTable.DefaultView In my table I have a column labeled "callType" that I would like to have be a comboBox (DataGridComboBoxColumn) I have

Flex DataGrid: Change value based on another value?

◇◆丶佛笑我妖孽 提交于 2019-12-24 02:22:19
问题 I have a DataGrid in Flex, with one column a checkbox and another a numeric value. When the checkbox is clicked, the numeric value should change, either to 0 if the checkbox is unselected, or to a pre-defined minimum value if the checkbox is selected. Here is the code I have: <mx:DataGrid x="0" y="45" width="272" height="525" dataProvider="{dp}" variableRowHeight="true" editable="true" id="equipmentDG" verticalAlign="middle"> <mx:columns> <mx:DataGridColumn headerText="" headerStyleName=