Search Results

Search found 1114 results on 45 pages for 'datagrid'.

Page 2/45 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • WPF input datagrid?

    - by SAD
    I would like to create an input DataGrid - an empty set of rows with the column headers that can be filled with data by a user and then saved to a database. The DataGrid will not be therefore used to display data but acts like an input field. The behaviour would be similar to the one of Excell. The problem is that if the DataGrid has no data provided for it, it is not visible in the application and the user cannot enter anything. Is the DataGrid a good choice? How can this sort of functionality be implemented with a different control? I would prefer to use the DataGrid tough. Thanks a lot for any help on this.

    Read the article

  • [WPF Datagrid] Binding to a List<>

    - by Tr?n Qu?c Bình
    I have a datagrid like this: <dg:DataGrid Name="dg" AutoGenerateColumns="False" CanUserDeleteRows="True"> <dg:DataGrid.Columns> <dg:DataGridTextColumn Header="Product Code" x:Name="columnProductCode" Binding="{Binding Path=Product.ProductCode}" IsReadOnly="True" ></dg:DataGridTextColumn> <dg:DataGridTextColumn Header="Product Name" x:Name="columnProductName" Binding="{Binding Path=Product.Name}" IsReadOnly="True" ></dg:DataGridTextColumn> <dg:DataGridTextColumn Header="ProductMeasure" x:Name="columnDonViTinh" Binding="{Binding Path=Product.Measure IsReadOnly="True"></dg:DataGridTextColumn> <dg:DataGridTextColumn Header="Quantity" x:Name="ColumnQuantity" Binding="{Binding Path=Quantity IsReadOnly="False"></dg:DataGridTextColumn> </dg:DataGrid.Columns> </dg:DataGrid> In the behind code, I have a struct like this: private struct ProductDetail { public TProduct Product { get; set ; } // TProduct is a class provied by a web service public int Quantity { get; set; } } and a List like this: private IList<ProductDetail> bs = new List<ProductDetail>(); I had tried to fill data to "bs". And binding like this: this.dg.ItemsSource = this.bs; Everything is ok. I can insert a new row, delete row, but when I try to modified the column Quantity then click on the header of the datagrid (to resort) -- the Quantity column change to it is before. How can I fix this problem. Thanks advanced.

    Read the article

  • Synchronize DataGrid and DataForm in Silverlight 3

    - by SpiralGray
    I've been banging my head against the wall for a couple of days on this and it's time to ask for help. I've got a DataGrid and DataForm on the same UserControl. I'm using an MVVM approach so there is a single ViewModel for the UserControl. That ViewModel has a couple of properties that are relevant to this discussion: public ObservableCollection<VehicleViewModel> Vehicles { get; private set; } public VehicleViewModel SelectedVehicle { get { return selectedVehicle; } private set { selectedVehicle = value; OnPropertyChanged( "SelectedVehicle" ); } } In the XAML I've got the DataGrid and DataForm defined as follows: <data:DataGrid SelectionMode="Single" ItemsSource="{Binding Vehicles}" SelectedItem="{Binding SelectedVehicle, Mode=TwoWay}" AutoGenerateColumns="False" IsReadOnly="True"> <dataFormToolkit:DataForm CurrentItem="{Binding SelectedVehicle}" /> So as the SelectedItem changes on the DataGrid it should push that change back to the ViewModel and when the ViewModel raises the OnPropertyChanged the DataForm should refresh itself with the information for the newly-selected VehicleViewModel. However, the setter for SelectedVehicle is never being called and in the Output window of VS I'm seeing the following error: System.Windows.Data Error: ConvertBack cannot convert value 'xxxx.ViewModel.VehicleViewModel' (type 'xxxx.ViewModel.VehicleViewModel'). BindingExpression: Path='SelectedVehicle' DataItem='xxxx.ViewModel.MainViewModel' (HashCode=31664161); target element is 'System.Windows.Controls.DataGrid' (Name=''); target property is 'SelectedItem' (type 'System.Object').. System.MethodAccessException: xxxx.ViewModel.MainViewModel.set_SelectedVehicle(xxxx.ViewModel.VehicleViewModel) It sounds like it's having a problem converting from a VehicleViewModel to an object (or back again), but I'm confused as to why that would be (or even if I'm on the right track with that assumption). Each row/item in the DataGrid should be a VehicleViewModel (because the ItemsSource is bound to an ObservableCollection of that type), so when the SelectedItem changes it should be dealing with an instance of VehicleViewModel. Any insight would be appreciated.

    Read the article

  • Flex : How to link data to a datagrid ?

    - by Tristan
    Hello, I'm following flex tutorials but i'm not doing exactly as they do, so : What i want I have an input text, with a button 'search'. I want when this button is clicked that the data returned by the function search are displayed in the datagrid. What i have : The text input : <s:TextInput includeIn="DetailServeurs" x="58" y="361" width="209" id="txt_search" text="Default text" focusIn="txt_search_focusInHandler(event)"/> a Search button : <s:Button includeIn="DetailServeurs" x="275" y="361" label="Rechercher" id="btn_rechercher" click="btn_rechercher_clickHandler(event)"/> a clickhandler for this search button : protected function btn_rechercher_clickHandler(event:MouseEvent):void { if(txt_search.text != ""){ getServeurByNameResult.token = serveurService.getServeurByName(txt_search.text); } } and a datagrid : <mx:DataGrid includeIn="DetailServeurs" x="30" y="124" width="1002" height="179" id="dataGrid" dataProvider="{getServeurByNameResult.lastResult}"> <mx:columns> <mx:DataGridColumn headerText="GSP_nom" dataField="GSP_nom"/> <mx:DataGridColumn headerText="port" dataField="port"/> ........ </mx:columns> </mx:DataGrid> So how can i display the results in the datagrid ? Thanks ! ;)

    Read the article

  • WPF DataGrid populating blank rows on TreeView's SelectedItemChanged

    - by jes9582
    When my DataGrid populates on the TreeView's SelectedItemChanged event it finds the objects and creates the rows accordingly but the rows populate with no text or are just blank. So I know it is finding my objects but it is not displaying them properly. Does anyone see where I made an error or suggest any changes or fixes? Thank you in advance! Here is the CSharp code that is setting the DataGrid's ItemsSource (I am using .dbml and LINQ with Lambda expressions): dgSystemSettings.ItemsSource = (tvSystemConfiguration.SelectedItem as SYSTEM_SETTINGS_GROUP).SYSTEM_SETTINGS_NAMEs.Join(ssdc.SYSTEM_SETTINGS_VALUEs, x => x.SSN_ID, y => y.SSV_SSN_ID, (x, y) => new { SYSTEM_SETTINGS_NAME = x, SYSTEM_SETTINGS_VALUE = y }); And here is the .xaml: <DataGrid Name="dgSystemSettings" AutoGenerateColumns="False" Height="447" Width="513" DockPanel.Dock="Right" ItemsSource="{Binding}" VerticalAlignment="Top" Margin="10,10,0,0"> <DataGrid.Columns> <DataGridTextColumn x:Name="colDisplayName" Header="Name" Binding="{Binding SSN_DISPLAY_NAME}"></DataGridTextColumn> <DataGridTextColumn x:Name="colValue" Header="Value" Binding="{Binding SSV_VALUE}"></DataGridTextColumn> </DataGrid.Columns> </DataGrid>

    Read the article

  • Silverlight DataGrid's sort by column doesn't update programmatically changed cells

    - by David Seiler
    For my first Silverlight app, I've written a program that sends user-supplied search strings to the Flickr REST API and displays the results in a DataGrid. Said grid is defined like so: <data:DataGrid x:Name="PhotoGrid" AutoGenerateColumns="False"> <data:DataGrid.Columns> <data:DataGridTextColumn Header="Photo Title" Binding="{Binding Title}" CanUserSort="True" CanUserReorder="True" CanUserResize="True" IsReadOnly="True" /> <data:DataGridTemplateColumn Header="Photo" SortMemberPath="ImageUrl"> <data:DataGridTemplateColumn.CellTemplate> <DataTemplate> <StackPanel Orientation="Horizontal" VerticalAlignment="Center"> <TextBlock Text="Click here to show image" MouseLeftButtonUp="ShowPhoto"/> <Image Visibility="Collapsed" MouseLeftButtonUp="HidePhoto"/> </StackPanel> </DataTemplate> </data:DataGridTemplateColumn.CellTemplate> </data:DataGridTemplateColumn> </data:DataGrid.Columns> </data:DataGrid> It's a simple two-column table. The first column contains the title of the photo, while the second contains the text 'Click here to show image'. Clicks there call ShowPhoto(), which updates the Image element's Source property with a BitmapImage derived from the URI of the Flickr photo, and sets the image's visibility to Visible. Clicking on the image thus revealed hides it again. All of this was easy to implement and works perfectly. But whenever I click on one of the column headers to sort by that column, the cells that I've updated in this way do not change. The rest of the DataGrid is resorted and updated appropriately, but those cells remain behind, detached from the rest of their row. This is very strange, and not at all what I want. What am I doing wrong? Should I be freshening the DataGrid somehow in response to the sort event, and if so how? Or if I'm not supposed to be messing with the contents of the grid directly, what's the right way to get the behavior I want?

    Read the article

  • How to make WPF DataGrid Column Header transparent

    - by joerage
    Hi, I am trying to make the column header of my WPF Datagrid to be transparent. I am able to set it to a color without problem, but I can't have it transparent. Here is what I tried: <Style x:Key="DatagridColumnHeaderStyle" TargetType="{x:Type tk:DataGridColumnHeader}"> <Setter Property="Background" Value="Transparent" /> <Setter Property="Foreground" Value="#C2C4C6" /> </Style> <Style x:Key="DashboardGridStyle" TargetType="{x:Type tk:DataGrid}"> <Setter Property="ColumnHeaderStyle" Value="{StaticResource DatagridColumnHeaderStyle}" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="RowBackground" Value="Transparent" /> </Style> <tk:DataGrid Style="{StaticResource DashboardGridStyle}" > ... </tk:DataGrid> With this code, it seems to take the default brush. What am I missing?

    Read the article

  • Silverlight DataGrid: Hiding columns using VisualStateManager

    - by Lars Udengaard
    Is it possible to hide a column of a datagrid, without using codebehind? E.g. by using the VisualStateManager? <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" x:Class="Buttons.MainPage" Width="640" Height="480"> <StackPanel x:Name="LayoutRoot" Width="624" HorizontalAlignment="Right" Margin="0,0,8,0" > <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="EditStates"> <VisualState x:Name="ReadOnly" /> <VisualState x:Name="Edit"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ShownInEditMode" Storyboard.TargetProperty="(UIElement.Visibility)" BeginTime="00:00:00" Duration="00:00:00.0010000"> <DiscreteObjectKeyFrame KeyTime="00:00:00"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <data:DataGrid AutoGenerateColumns="False" ItemsSource="{Binding BBRNumbers}"> <data:DataGrid.Columns> <data:DataGridTextColumn Header="AlwaysShown" Width="80" Binding="{Binding Municipality}" /> <data:DataGridTextColumn Header="ShownInEditMode" Width="73" Binding="{Binding Estate}" Visibility="Collapsed" /> </data:DataGrid.Columns> </data:DataGrid> </StackPanel> Calling the following should then hide the column, but this doesnt work. VisualStateManager.GoToState(this, "Edit", false); Any ideas?

    Read the article

  • WPF DataGrid and Avalon TimePicker binding problem

    - by Jorge Vargas
    I'm using a the WPF DataGrid from the wpf toolkit and a TimePicker from AvalonControlsLibrary to insert a collection of TimeSpans. My problem is that bindings are not working inside the DataGrid, and I have no clue of why this isn't working. Here is my setup: I have the following XAML: <Window x:Class="Views.TestMainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wpf="http://schemas.microsoft.com/wpf/2008/toolkit" xmlns:a="http://schemas.AvalonControls/AvalonControlsLibrary/Controls" SizeToContent="WidthAndHeight" MinHeight="250" MinWidth="300"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <GroupBox Grid.Row="0"> <GroupBox.Header> Testing it: </GroupBox.Header> <wpf:DataGrid ItemsSource="{Binding Path=TestSpans}" AutoGenerateColumns="False"> <wpf:DataGrid.Columns> <wpf:DataGridTemplateColumn Header="Start"> <wpf:DataGridTemplateColumn.CellEditingTemplate> <DataTemplate> <a:TimePicker SelectedTime="{Binding Path=., Mode=TwoWay}" /> </DataTemplate> </wpf:DataGridTemplateColumn.CellEditingTemplate> <wpf:DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding}" /> </DataTemplate> </wpf:DataGridTemplateColumn.CellTemplate> </wpf:DataGridTemplateColumn> </wpf:DataGrid.Columns> </wpf:DataGrid> </GroupBox> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1"> <a:TimePicker SelectedTime="{Binding Path=SelectedTime, Mode=TwoWay}" /> </StackPanel> </Grid> And this is my ViewModel: Imports System.Collections.ObjectModel Namespace ViewModels Public Class TestMainWindowViewModel Private _selectedTime As TimeSpan = DateTime.Now.TimeOfDay Public Property SelectedTime() As TimeSpan Get Return _selectedTime End Get Set(ByVal value As TimeSpan) _selectedTime = value End Set End Property Private _testSpans As ObservableCollection(Of TimeSpan) = New ObservableCollection(Of TimeSpan) Public Property TestSpans() As ObservableCollection(Of TimeSpan) Get Return _testSpans End Get Set(ByVal value As ObservableCollection(Of TimeSpan)) _testSpans = value End Set End Property Public Sub New() _testSpans.Add(DateTime.Now.TimeOfDay) _testSpans.Add(DateTime.Now.TimeOfDay) _testSpans.Add(DateTime.Now.TimeOfDay) End Sub End Class End Namespace I'm starting this window in application.xaml.vb like this: Class Application ' Application-level events, such as Startup, Exit, and DispatcherUnhandledException ' can be handled in this file. Protected Overrides Sub OnStartup(ByVal e As System.Windows.StartupEventArgs) MyBase.OnStartup(e) Dim window As Views.TestMainWindow = New Views.TestMainWindow window.DataContext = New TestMainWindowViewModel() window.Show() End Sub End Class

    Read the article

  • How to autoscroll on WPF datagrid

    - by Christian
    Hi, I think I am stupid. I searched now for 15 minutes, and found several different solutions for scrolling on datagrids, but none seems to work for me. I am using WPF with .NET 3.5 and the WPF Toolkit DataGrid. My grid gets updated when my observable collection changes, works perfectly. Now, my DataGrid is located inside a normal Grid and scrollbars appear if the DataGrid gets to big. Also fine... And know, the 1.000.000 $ question: How do I get the datagrid to scroll to the last row. There is: no AutoScroll Property no CurrentRowSelected Index a CurrentCell, but no Collection I could use for CurrentCell = AllCells.Last Any ideas? I feel really stupid, and it seems strange that this question is so hard. What am I missing?

    Read the article

  • Silverlight DataGrid refresh problem

    - by Krimson
    Hi, I have encountered a problem when I refresh the observable collection behind my Silverlight DataGrid (the DataGrid binds to a PagedCollectionView with an ObservableCollection as source). When I clear the observable collection and add the new items to the collection the DataGrid repositions to the top. I want the DataGrid to keep the scroll position. This seems to somewhat happen if I remove the items in the collection one-by-one with the RemoveAt mehtod and the add the new items one-by-one. But why is there this difference between removing all the items at once with the Clear method and removing the items one-by-one with the RemoveAt method? Best Regards, Jesper

    Read the article

  • Finding x,y position of a datagrid / adavancedDataGrid row in Flex

    - by zak kus
    I have flex advancedDataGrid (could use dataGrid if that works better, though i like my meta-column headers), and i want to have a component popup on top of a selected row. The problem is, i can figure out how to reference an actual rendered row of a datagrid (rather than an item of the dataprovider) in order to get its position on the screen. Does anyone have any theories on how to access a "row" of a datagrid, or at least get its position? Cheers

    Read the article

  • Is DataGrid a necessity in WPF?

    - by Jobi Joy
    I have seen a lot of discussions going on and people asking about DataGrid for WPF and complaining about Microsoft for not having one with their WPF framework till date. We know that WPF is a great UI technology and have the Concept of ItemsControl,DataTemplate, etc,etc to make great UX. Even WPF has got a more closely matching control- ListView, which can be easily templated to give better UX than a traditional Datagrid like display. And I would say a readymade DataGrid control will kill or hide a lot of creativity and it surely will decrease the innovations in User Experience field. So what is your opinion about the need of DataGrid in WPF as a Framework component? If you feel it is necessary then is it just because the world is so used to the DatGrid way of data display for many years? Some other threads having the discussion about DatGrid are here and here Link to WPF ToolKit - Latest WPF DatGrid

    Read the article

  • WPF Datagrid zoom issue

    - by David Osborn
    I'm working with the WPF DataGrid from the WPFToolkit and I'm having issues with trying to zoom the entire datagrid. My initial thought was that it was going to be really easy and I would just apply a scale transform to the grid and animate the ScaleX, ScaleY properties when the used clicked a button. This did not work however because the scrollbar was zoomed in making it larger. I need fixed headers and fixed columns on the datagrid so I can't simple use a scrollviewer outside of the datagrid to handle the scrolling. The second thing I tried was to just scale the font size in the grid, but this failed because on shrinking the font size the columns stay at the original width and do not shrink. Finally I thought I had it working by using the below code which goes into the view tree for the datagrid and adds a scale transform to the Scroll Content Presenter. (Also not shown in this code, I apply a transform to the visual tree item for the headers in the same manner so that it scales as well). I thought this was working great until I tested out the horizontal scrolling after zooming. (Vertical scrolling works perfectly.) Before zooming at all the horizontal scrolling is fine, but after zooming, when I scroll horzonitally the display freaks out. It is hard to tell exactly what it is doing, but it sort of looks like the content that is scrolling off the left of the screen is "folding over" and coming back in on the left. Maybe it is just all smashing up on the left side. Does anyone have any ideas how I can get this working, hopefully without throwing out my whole datagrid that is already working quite well otherwise. ScrollContentPresenter sp = (ScrollContentPresenter) VisualTreeHelper.GetChild( VisualTreeHelper.GetChild( VisualTreeHelper.GetChild(VisualTreeHelper.GetChild(dgMatrix, 0), 0), 0),2); ScaleTransform st = new ScaleTransform(1, 1); sp.LayoutTransform = st; DoubleAnimation a = new DoubleAnimation(); a.By = 1.5; a.AutoReverse = false; a.Duration = new Duration(TimeSpan.Parse("0:0:0.25")); st.BeginAnimation(ScaleTransform.ScaleXProperty, a); st.BeginAnimation(ScaleTransform.ScaleYProperty, a);

    Read the article

  • Flex datagrid headerColor style not working....

    - by Jerry
    Hello guys. I am trying to change the datagrid header color by editing headerColor style. I could change the font size, font family...etc except the headerColor. Would someone help me about it? Thanks a lot. My code Mxml <mx:DataGrid id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{cityinfoResult3.lastResult}"> <mx:columns> <mx:DataGridColumn headerText="Detail" dataField="detail"/> <mx:DataGridColumn headerText="Name" dataField="name"/> </mx:columns> </mx:DataGrid> Style #dataGrid{ headerColors: #ff6600; //everything works except this one. The color can't be //changed? rollOverColor: #33ccff; textRollOverColor: #ffffff; iconColor: #ff0000; fontFamily: Arial; fontSize:12; dropShadowEnabled: true; alternatingItemColors: #330099, #0000cc; color: #ffffff; borderColor: #ffffff; }

    Read the article

  • QueryReadStore loads JSON into DataGrid, but JsonRestStore does not (from the same source)

    - by labratmatt
    I'm building a Dojo DataGrid from JSON data provided by my REST interface. The DataGrid loads the data fine using a QueryReadStore, but doesn't seem to work with the same same data piped into a JsonRestStore. I'm using the following Dojo libs with Dojo 1.4.1: dojo.require("dojox.data.JsonRestStore"); dojo.require("dojox.grid.DataGrid"); dojo.require("dojox.data.QueryReadStore"); dojo.require("dojo.parser"); I declare my stores in the following manner: var storeJRS = new dojox.data.JsonRestStore({target:"api/collaborations.php/1", idAttribute: 'items[].id'}); var storeQRS = new dojox.data.QueryReadStore({url:"api/collaborations.php/1", requestMethod:"get"}); I create my grid layout like this: var gridLayout = [ new dojox.grid.cells.RowIndex({ name: "Row #", width: 5, styles: "text-align: left;" }), { name: "Name", field: "name", styles: "text-align:right;", width:20 }, { name: "Description", field: "description", width:30 } ]; I create my DataGrid as follows: The above works, but if I use QueryReadStore as my store, the grid is created with the headers (Name, Description), but it isn't populated with any rows: <div dojoType="dojox.grid.DataGrid" jsid="grid3" store="storeQRS" structure="gridLayout" style="height:500px; width:1000px;"></div> Using FireBug, I can see that QueryReadStore is getting my JSON data from my REST interface. It looks like the following: {"numRows":6,"items":[{"name":"My Super Cool Collab","description":"This is for all the super cool people in the super cool group","id":1},{"name":"My Other Super Cool","description":"This is for all the other super cool people","id":3},{"name":"This is another coll","description":"This is just some other collab","id":4},{"name":"some new collab","description":"this is a new collab","id":5},{"name":"yet another new coll","description":"uh huh","id":6},{"name":"asdf","description":"asdf","id":7}]} Any ideas? Thanks.

    Read the article

  • Grouping in datagrid - rows not getting displayed

    - by Archie
    Hello, I have to group the data int the datagrid. I have done following for that: Have added the style to resources as: > <Style x:Key="GroupHeaderStyle" > TargetType="{x:Type GroupItem}"> > <Setter Property="Template"> > <Setter.Value> > <ControlTemplate TargetType="{x:Type GroupItem}"> > <Expander IsExpanded="False" > > > <Expander.Header> > <TextBlock Text="{Binding Name}"/> > </Expander.Header> > <ItemsPresenter /> > </Expander> > </ControlTemplate> > </Setter.Value> > </Setter> > </Style> I have applied the style as: <dg:DataGrid Grid.Row="1" Name="dgAuthor" HorizontalScrollBarVisibility="Hidden" AutoGenerateColumns="False" RowHeaderWidth="17" RowHeight="25"> <dg:DataGrid.GroupStyle> <GroupStyle ContainerStyle="{StaticResource GroupHeaderStyle}"> <GroupStyle.Panel> <ItemsPanelTemplate> <dg:DataGridRowsPresenter/> </ItemsPanelTemplate> </GroupStyle.Panel> </GroupStyle> </dg:DataGrid.GroupStyle> </dg:DataGrid> I have infoList as a ObservableCollection and have assigned it as itemssource as follows: ListCollectionView lcv = new ListCollectionView(infoList); lcv.GroupDescriptions.Add(new PropertyGroupDescription("Author")); dgAuthor.ItemsSource = lcv; where Info is class which has Author,Book,Year properties. I have to group the datagrid on Author property. I am able to display the explander but cannot see any rows in it. Can anybody tell me whats wrong with the code?

    Read the article

  • Implement master detail in one datagrid in wpf

    - by Archie
    Hello, I have classes as following: public class Property { public string PropertyName { get; set; } public int SumSubPropertValue; private List<SubProperty> propertyList; public void CalculateSumSubPropertValue { // implementation} } public class SubProperty { public string SubPropertyName { get; set; } public int SubPropertyValue { get; set; } } I have grouped the rows in datagrid on PropertyName . When the user clicks on PropertyName expnader the columns should display SubPropertyName and SubPropertyValue. Also SumSubPropertValue should appear in front of PropertyName in the expander header. My Datagrid is bound to a CollectionViewSource as follows: CollectionViewSource view = new CollectionViewSource(); view.Source = infoList; view.GroupDescriptions.Add(new PropertyGroupDescription("PropertyName")); Where infoList is ObservableCollection<Property>. My datagrid colmns look like <my:DataGrid.Columns> <my:DataGridTextColumn Header="SubPropertyName" Binding="{Binding SubPropertName}" Width="*"/> <my:DataGridTextColumn Header="SubPropertyValue" Binding="{Binding SubPropertyValue}" Width="*"/> </my:DataGrid.Columns> Can someone help me with it?

    Read the article

  • Silverlight datagrid fails to display data.

    - by Jekke
    I have a datagrid defined in my project's XAML: <data:DataGrid IsReadOnly="True" Grid.Row="1" Grid.Column="1" x:Name="gridOfferings" Margin="10,10,10,10" AutoGenerateColumns="False"> <data:DataGrid.Columns> <data:DataGridTextColumn Binding="{Binding Trader}" DisplayIndex="0" Header="Trader" Width="Auto" FontSize="11"/> <data:DataGridTextColumn Binding="{Binding Product}" DisplayIndex="1" Header="Product" Width="Auto" FontSize="11"/> </data:DataGrid.Columns> </data:DataGrid> I bind it to a List< of custom objects: public MainPage() { InitializeComponent(); _Rows = new List<OfferingRowData>(); _Rows.Add(new OfferingRowData() { Trader = "Kameilya Loenstein", Product = "American Consolidated AAA", Price = 24.95, OfferingMade = DateTime.Now }); _Rows.Add(new OfferingRowData() { Trader = "Bill Foobar", Product = "IBM Mid-Atlantic Exotic", Price = 204.90, OfferingMade = DateTime.Now.AddMinutes(-3) }); gridOfferings.ItemsSource = _Rows; } When it shows up on the page, the column headers appear, but none of the data does. What am I doing wrong?

    Read the article

  • Checkbox gets reset in WPF Datagrid when sorting

    - by user464420
    I have a WPF application with DataGrid The DataGrid contains 4 columns with a checkbox template column on the first column the problem is when i check some of the checkbox on the items, the checkbox would got reset when i sort a certain column. For example i check the checkbox on the row 2 it gets unchecked when i sort the datagrid. been searching for similar case like this for a while but haven't seen one Thanks,

    Read the article

  • Flex datagrid headerColor style is not working....

    - by Jerry
    Hello guys. I am trying to change the datagrid header color by editing headerColor style. I could change the font size, font family...etc except the headerColor. Would someone help me about it? Thanks a lot. My code Mxml <mx:DataGrid id="dataGrid" creationComplete="dataGrid_creationCompleteHandler(event)" dataProvider="{cityinfoResult3.lastResult}"> <mx:columns> <mx:DataGridColumn headerText="Detail" dataField="detail"/> <mx:DataGridColumn headerText="Name" dataField="name"/> </mx:columns> </mx:DataGrid> Style #dataGrid{ headerColors: #ff6600; //everything works except this one. The color can't be //changed? rollOverColor: #33ccff; textRollOverColor: #ffffff; iconColor: #ff0000; fontFamily: Arial; fontSize:12; dropShadowEnabled: true; alternatingItemColors: #330099, #0000cc; color: #ffffff; borderColor: #ffffff; }

    Read the article

  • How can I reload a datagrid in flash action script, after an xml file has loaded

    - by optician
    Hi Everyone, Does anyone know how to change the rowcount of a datagrid in flash after it has been created on the stage. I am loading an xml file externally that contains the number of rows the datagrid should have, but the problem is that becuase this file is not loaded at runtime, it just picks the default 3 items. Maybe I have to reload the datagrid on the stage, or loop until it is defined. Does anyone have experince of this. Regards, Chris

    Read the article

  • WPF DataGrid Vs Windows Forms DataGridView

    - by Mrk Mnl
    I have experience in WPF and Windows Forms, however have only used the Windows Forms DataGridView and not the WPF DataGrid (which was only included in .Net 4 or could be added to .Net 3.5 from Codeplex, I understand). I am about to devlop an app using one of these controls heavily for large amounts of data and have read performance is an issue with the WPF DataGrid so I may stick to the Windows Forms DataGridView.. Is this the case? I do not want to use a 3rd party control. Does the Windows Forms DataGridView offer significant performance over the WPF DataGrid for large amounts of data? If I were to use WPF I would prefer to use .Net 3.5S SP1, unless the DataGrid in the .Net 4 is significantly better? Also I want to use ADO with DataTable's which I feel is better suited to Windows Forms..

    Read the article

  • Flex 4.6 Mobile - Scrolling to the last added item in a dataGrid with variableRowHeight

    - by user1305331
    I'm trying to set the scroll vertical position of a spark dataGrid to show the items as I add them to the grid. I know you can set the scroll position like this: dataGrid.scroller.viewport.verticalScrollPosition = itemPosition*rowHeight; The problem is that the dataGrid have variableRowHeight, as each row word wraps their name labels, and I don't know how to get each row height. I though of getting the itemRenderer associated with every item as I add it to the grid, and keep the total row height value in a variable, but don't know how to achieve that. Is there any way to set the scroll position of a dataGrid with variableRowHeight to show the last added item?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >