datagrid

Issue with removing item from ObservableCollection, I am doing something wrong

隐身守侯 提交于 2019-12-24 09:25:23
问题 I have a DataGrid which contains informations about products, like NAME and PRICE, Items could be added or removed from DataGrid by Pressing DEL Key down (Remove case). I am using ObservableCollection as DataGrid source, and it looks like this: ObservableCollection<ProductTemporary> result = ProductsTempController.Instance.SelectAll(); Also there is button on my Window which is keeping sum of my product's prices updated all the time, when item is added sum is increased, when item is removed

How to get name of a List<string> from List<List<string>> to bind it dynamically? [closed]

不羁岁月 提交于 2019-12-24 09:14:35
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I have a dynamic DataGrid in Which 1 column contains ComboBox template. Now I'll get 'N' number of comboboxes. Each ComboBox should have different ItemsSource. how can it be achieved? My dynamic datagrid has the property ItemsSourceBinding. Now I need to provide a DataContext

How to customize the datagrid in UWP apps

≡放荡痞女 提交于 2019-12-24 09:00:00
问题 I am currently implementing an UWP application. The mockups for the application includes design for displaying an image and text in same column within data grid and highlighting the grid column for few seconds based on some condition. As far as I know there is no control available for DataGrid in UWP, so please suggest me if there is any other Grid available in market which I can used as an alternative for datagrid or we need to customize the DataGrid to meet our requirements? 回答1: Yes, there

flex - get linkbutton label name and selected row of datagrid

扶醉桌前 提交于 2019-12-24 08:59:48
问题 i am using below code for using linkbutton in flex datagrid <mx:DataGridColumn headerText="Case ID" width="80"> <mx:itemRenderer> <fx:Component> <mx:Canvas> <mx:LinkButton id="lnkCaseId" click="outerDocument.lnkCaseIdClick(event)" label="{data.caseId}" textDecoration="underline" color="#0052A5"> </mx:LinkButton> </mx:Canvas> </fx:Component> </mx:itemRenderer> </mx:DataGridColumn><br/> now on link button click i want linkbutton label name and selected row inside lnkCaseIdClick method, how can

Dotted Horizontal Grid Lines in WPF DataGrid

拈花ヽ惹草 提交于 2019-12-24 08:51:32
问题 Is there a way to have a dotted line on the horizontal grid lines in WPF datagrid? I have googled everywhere and cannot seem to find a concrete way of doing so. One solution that may solve this is setting the Datagrid.RowStyle. I have tried this and it causes error. I have binded my datagrid to a datatable. 2 columns are just text and the 3rd one is an image column. For this columns, I used DataGridTemplateColumn. Textblock and Image. I hope you can help me guys...If you want a sample of my

Flex DataGrid row color spreads when scrolled up down

女生的网名这么多〃 提交于 2019-12-24 08:39:44
问题 I'm facing issue with datagrid row background color being spread when datagrid is vertically scrolled. I'm assuming this is happening because ItemRenderers are recycled. Here's my code : <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" minWidth="955" minHeight="600" > <mx:Script> <![CDATA[ import mx.events.FlexEvent; private var rendererFactory:ClassFactory; protected function btn_clickHandler(event:MouseEvent):void {

Notification of DataGrid when Collection inside Collection changes

。_饼干妹妹 提交于 2019-12-24 08:36:09
问题 Since hours I am working on a very hard problem: How is a DataGrid that is bound to an ObservableCollection correctly updated when another ObservableCollection that is inside the ObservableCollection the DataGrid is bound to changes ? So far the DataGrid onnly refreshes when i click on the corresponding cell. I have prepared a complete source code example to illustrate the following (very simple) situation: There is a ViewModel that holds a List. This List is an ObservableCollection and hold

SelectionChanged Event does not fire after reselecting Datagrid row?

只愿长相守 提交于 2019-12-24 08:07:14
问题 A simple Datagrid which groups row by one of the property: <DataGrid x:Name="MyDataGrid" SelectionChanged="MyDataGrid_SelectionChanged" ItemsSource="{Binding Programs}" Style="{StaticResource dataGridStyle}"> <DataGrid.GroupStyle> <GroupStyle ContainerStyle="{StaticResource GroupHeaderStyle}"> <GroupStyle.HeaderTemplate> <DataTemplate> <StackPanel> <TextBlock Text="{Binding Path=Heading}" /> </StackPanel> </DataTemplate> </GroupStyle.HeaderTemplate> </GroupStyle> </DataGrid.GroupStyle> <

Is it good idea to write own grid in my case?

自古美人都是妖i 提交于 2019-12-24 07:19:44
问题 I need to do this data grid with sorting, AJAX, paging and loading variety data. What is better customize exists grid(jqGrid, flexcGrid etc) or write my own? 回答1: Start with your own ajax datagrid. I've wrote such an application with xajax and a nested xml datastructure. It's quite simple and you are more independent from the business side of your application (moneytize and personal contact). I can show you some examples. 回答2: Start with using existing one - there's no point in reinventing

WPF ComboBox in Datagrid throws error if Binding is NULL

喜欢而已 提交于 2019-12-24 07:07:57
问题 I have a DataGrid I want to edit. One column is a Combobox <DataGrid ItemsSource="{Binding Persons, Mode=TwoWay}" SelectedItem="{Binding SelectedPerson, Mode=TwoWay}" > <DataGrid.Columns> <DataGridTemplateColumn Header="Company" > <DataGridTemplateColumn.CellEditingTemplate> <DataTemplate> <ComboBox ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}, Path=DataContext.Companies}"/> </DataTemplate> </DataGridTemplateColumn.CellEditingTemplate>