datagrid

Acess to a DataGrid through C# code and manipulate data inside the DataGrid

懵懂的女人 提交于 2019-12-25 03:57:19
问题 My DataGrid XAML code 1- I want to be able to add new rows and acess to data of one column of the DataGrid, i've tried using the Name prop but it doesn't work... 2- After that, to add a new row i just have to call the Add method of dataGrid.Items ? What do i feed that method with? Create a class with proprieties representing the columns like answered here ? 3- I have a column named "Nota", how do i acess to the data of that column in every row? Thanks in advance, -A 回答1: 1. You cannot access

how to get the User control Value which is nested inside the datagrid to String

本小妞迷上赌 提交于 2019-12-25 03:56:16
问题 I need to access the Value of User control which is present inside the data Grid.as shown below Actually what i want is once the data is bind to the grid it will check whether there is a value in the Expence column of the Datagrid if the value is null then the user control will be visible where user can select the value and will click save. my aspx code: <asp:UpdatePanel ID="UPChargesGrid" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:DataGrid ID="dgDestination" runat=

How do I get a DataGridTemplateColumn to work with objects implementing the IEditable<T> interface?

让人想犯罪 __ 提交于 2019-12-25 03:27:26
问题 I have a DataGrid with a DataGridComboBox column that works fine. It binds properly to the list of items, correctly displays the selected item, correctly selects an item, and binds the selected item's ID to the underlying row model properly. It looks like this: <DataGridComboBoxColumn x:Name="AssetColumn" Width="3*" DisplayMemberPath="Item" Header="Item" ItemsSource="{Binding Data.AssetDescriptions, Source={StaticResource proxy}}" SelectedValueBinding="{Binding AssetDescriptionID}"

dojo datagrid custom sorting server side

这一生的挚爱 提交于 2019-12-25 03:24:14
问题 I am using dojo.data.ItemFileWriteStore to draw a dojo datagrid (which works fine) and the grid shows properly. I was using client side sorting and that was also working fine. but now I need to change the sorting and do that server side. For this I am trying to use onHeaderCellClick event, using which I am able to run a javascript function.. something like gridInfo = { store: myJsonStore, structure: myStructure onHeaderCellClick:getSortedTable }; Now here is the getSortedTable function which

Show/Hide DataGrid Columns XAML

守給你的承諾、 提交于 2019-12-25 02:54:05
问题 I am trying to build a DataGrid with controls that will allow a user to Show/Hide the columns. My DataGrid will have something like 40 columns, and not all may be necessary all of the time. I have been able to do this exact thing with a ListView that uses a GridView. Here is the code: <DataGrid Name="MyDataGrid" Grid.Row="2" Grid.Column="0" ItemsSource="{Binding ReportOrderingCustomersForSalesRepCollection}" Style="{DynamicResource styleDataGrid}" HeadersVisibility="All" AutoGenerateColumns=

validation in flex datagrid using itemEditor

谁都会走 提交于 2019-12-25 02:53:25
问题 I have a datagrid which conatains two columns. Datatype and value. Datatype has a combobox with options like char, int, unsigned int, signed int etc.Now i want to have validation on what value is entered in value column. I am using following method . <mx:DataGridColumn headerText="Value" dataField="Values" width="100" editable="{!this.areVariablesReadOnly}"> <mx:itemEditor> <mx:Component> <mx:TextInput restrict="0-9" maxChars="3" /> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> This

How can I add Dependency Property to a DataGridRow WPF

旧城冷巷雨未停 提交于 2019-12-25 02:50:48
问题 I'm working with a custom Datagrid and I want add a property to a DatagridRow. I don't know how can to do that. I think I will crate a custom dataGridRow but I Can't use it in my Custom DataGrid. Error message: A style intended for type 'DataGridRowEx' cannot be applied to type 'DataGridRow This's my XAML code for my custom DataGridRow: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr

Manipulate and Dedupe Array of data for display into DataGrid

早过忘川 提交于 2019-12-25 02:43:35
问题 I have an array of data brought into my VB .Net program that follows the following format. Order No.|Description|Colour|Size|Total Qty.|Order Date|Expected D.D. 2273448|NOK OPAQUE KNEE HIGH |BLACK |X |001 |02/12/2013 |05/12/2013 2231428|UX XR WARM HOLD UPS |NAVY |ONE SIZE |001 |02/12/2013 |05/12/2013 2231428|NHS SOFTHOLD HOLD-UP |BLACK |X |001 |02/12/2013 |05/12/2013 2265640|KX XR WARM TIGHTS |BLACK |XXL |001 |02/12/2013 |05/12/2013 2273448|NOK OPAQUE KNEE HIGH |BLACK |X |001 |02/12/2013 |05

unicode datagridview win forms

点点圈 提交于 2019-12-25 02:28:29
问题 I have problem with data grid view in win forms. If I try to display ' character data grid view displays some weird characters. (‘ & ’) Anyone knows how to solve this problem to make it display ' 回答1: Maybe it's an encoding issue. Where does the data come from and how do you load it into the data grid view? 回答2: You are seeing the UTF-8 byte sequence with the individual bytes displayed in the Windows-1252 encoding. More specifically, the unicode codepoints 2018 and 2019 are the left and

MVVM WPF : Validating datagrid row for autogeneratedcolumns

白昼怎懂夜的黑 提交于 2019-12-25 02:27:00
问题 I am creating a DataTable whose columns are stored in a list. public class CustomColumn { public string ColumnName { get; set; } public int MinLength { get; set; } public int MaxLength { get; set; } } public class ViewModel { public List<CustomColumn> Columns { get; set; } public DataTable MyTable { get; set; } public ViewModel() { InitializeCustomColumns(); MyTable = new DataTable(); foreach (CustomColumn column in Columns) { MyTable.Columns.Add(column.ColumnName, typeof(string)); } } } Now