Home Forums WPF controls Xceed DataGrid for WPF Dynamic Editor Display Sample; Not loading song data

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24340 |

    Am trying to get the dynamic editor display sample to work. Does not display song data. Any clues how I can proceed to fix it.

    Sample dll does seem to have data:

    <diffgr:diffgram xmlns:msdata=”urn:schemas-microsoft-com:xml-msdata”
    xmlns:diffgr=”urn:schemas-microsoft-com:xml-diffgram-v1″>
    <DataSet2 xmlns=”http://www.tempuri.org/DataSet2.xsd”&gt;
    <Songs>
    <SongID>1</SongID>
    <SongName>Divertimento Es-dur, KV 113, 1. Allegro</SongName>
    <Artist>Mozart, Wolfgang Amadeus</Artist>
    <Category>Classical</Category>
    <Country>Austria</Country>
    <Rating>5</Rating>
    <Included>false</Included>
    </Songs>
    <Songs>
    <SongID>2</SongID>
    <SongName>Vdol Po Rechenke</SongName>
    <Artist>Kitka</Artist>
    <Category>Folk</Category>
    <Country>Russia</Country>
    <Rating>4</Rating>
    <Included>true</Included>
    </Songs>
    <Songs>
    <SongID>3</SongID>
    <SongName>Alles Schwindel</SongName>
    <Artist>Lemper, Ute</Artist>
    <Category>Cabaret</Category>
    <Country>Germany</Country>
    <Rating>4</Rating>
    <Included>true</Included>
    </Songs>
    <Songs>
    <SongID>4</SongID>
    <SongName>Voldrien</SongName>
    <Artist>L’Ham de foc</Artist>
    <Category>Pop</Category>
    <Country>Spain</Country>
    <Rating>3</Rating>
    <Included>true</Included>
    </Songs>
    <Songs>
    <SongID>5</SongID>
    <SongName>Someone To Watch Over Me</SongName>
    <Artist>Gershwin, Georges</Artist>
    <Category>Jazz</Category>
    <Country>United States</Country>
    <Rating>3</Rating>
    <Included>true</Included>
    </Songs>
    <Songs>
    <SongID>6</SongID>
    <SongName>Umri Ma Bansa</SongName>
    <Artist>Salim, Abdel Gadir</Artist>
    <Category>Pop</Category>
    <Country>Sudan</Country>
    <Rating>3</Rating>
    <Included>false</Included>
    </Songs>
    <Songs>
    <SongID>7</SongID>
    <SongName>Tossed as it is Untroubled</SongName>
    <Artist>Cage, John</Artist>
    <Category>Classical</Category>
    <Country>United States</Country>
    <Rating>2</Rating>
    <Included>false</Included>
    </Songs>
    <Songs>
    <SongID>8</SongID>
    <SongName>Cassation in G, K. 63, Marcia</SongName>
    <Artist>Mozart, Wolfgang Amadeus</Artist>
    <Category>Classical</Category>
    <Country>Austria</Country>
    <Rating>2</Rating>
    <Included>false</Included>
    </Songs>
    <Songs>
    <SongID>9</SongID>
    <SongName>Le Sacre du Printemps Introduction</SongName>
    <Artist>Stravinsky, Igor</Artist>
    <Category>Classical</Category>
    <Country>Russia</Country>
    <Rating>3</Rating>
    <Included>false</Included>
    </Songs>
    <Songs>
    <SongID>10</SongID>
    <SongName>Danza de las Hachas</SongName>
    <Artist>Rodrigo, Joaquín</Artist>
    <Category>Classical</Category>
    <Country>Spain</Country>
    <Rating>3</Rating>
    <Included>false</Included>
    </Songs>
    <Songs>
    <SongID>11</SongID>
    <SongName>Der stuermische Morgen</SongName>
    <Artist>Schubert, Franz</Artist>
    <Category>Classical</Category>
    <Country>Austria</Country>
    <Rating>3</Rating>
    <Included>true</Included>
    </Songs>
    <Songs>
    <SongID>12</SongID>
    <SongName>There Will Never Be Another You</SongName>
    <Artist>Hawkins, Coleman</Artist>
    <Category>Jazz</Category>
    <Country>United States</Country>
    <Rating>3</Rating>
    <Included>true</Included>
    </Songs>
    <Songs>
    <SongID>13</SongID>
    <SongName>De Los Alamos Vengo, Madre</SongName>
    <Artist>Rodrigo, Joaquín</Artist>
    <Category>Folk</Category>
    <Country>Spain</Country>
    <Rating>2</Rating>
    <Included>true</Included>
    </Songs>
    <Songs>
    <SongID>14</SongID>
    <SongName>L’heure bleue</SongName>
    <Artist>Lemper, Ute</Artist>
    <Category>Pop</Category>
    <Country>Germany</Country>
    <Rating>1</Rating>
    <Included>true</Included>
    </Songs>
    <Songs>
    <SongID>15</SongID>
    <SongName>Ich Will Zu Land Ausreiten</SongName>
    <Artist>Stahl, Johannes</Artist>
    <Category>Folk</Category>
    <Country>Germany</Country> SDJ

    Imported from legacy forums. Posted by Phil (had 892 views)

    Xceed Support
    Member
    Post count: 5658

    What error are you getting?

    Imported from legacy forums. Posted by Jenny [Xceed] (had 234 views)

    User (Old forums)
    Member
    Post count: 23064

    Jenny, I wish this forum had a file upload feature for screen shots. Anyway, the main window loads with a row bar saying “Drag a column header here to group by that column” and a second row with 5 cells. The first cell is blank, the second cell says “Songs”, third cell blank, 4th cell “Last Played”, 5th, 6th, 7th cell blank. There are no cell columns below “Songs” or “Last Played”. Can’t drag the “Songs” cell header to the title bar.
    No data in the Songs or Last Played Columns.

    Maybe something wrong with the grid control view??

    <!– The Main DataGridControl is bound to a list of Songs. –>
    <xcdg:DataGridControl x:Name=”grid”
    ItemsSource=”{Binding Source={StaticResource cvsSongs}}”
    ItemScrollingBehavior=”Immediate”>
    <!–<xcdg:DataGridControl.View>
    –><!– In this sample, you can define this resource to specify the default
    theme this DataGridControl will be in. This is not mandatory, so we
    use a DynamicResource to silently ignore its absence. –><!–
    <xcdg:TableView Theme=”{DynamicResource defaultTheme}”/>
    </xcdg:DataGridControl.View>–>

    <xcdg:DataGridControl.View>
    <xcdg:TableView HorizontalGridLineThickness=”1″ VerticalGridLineThickness=”1″>
    <xcdg:TableView.Theme>
    <xcdg:AeroNormalColorTheme/>
    </xcdg:TableView.Theme>
    <xcdg:TableView.HorizontalGridLineBrush>
    <SolidColorBrush Color=”Orange”/>
    </xcdg:TableView.HorizontalGridLineBrush>
    <xcdg:TableView.VerticalGridLineBrush>
    <SolidColorBrush Color=”Orange”/>
    </xcdg:TableView.VerticalGridLineBrush>
    </xcdg:TableView>
    </xcdg:DataGridControl.View>

    <xcdg:DataGridControl.Columns>
    <xcdg:Column FieldName=”Included”
    Width=”80″
    GroupValueTemplate=”{StaticResource includedGroupValueTemplate}”/>
    <xcdg:Column FieldName=”SongName”
    IsMainColumn=”True”
    Width=”200″
    Title=”Song”/>
    <xcdg:Column FieldName=”Artist”
    Width=”150″/>
    <!– This column will use the DatePicker editor by default. You don’t have
    to specify anything. Xceed DataGridControl will always select an
    appropriate CellEditor according to the DataType. –>
    <xcdg:Column FieldName=”LastPlayed”
    Title=”Last Played”/>
    <!– Of course, you can also specify a particular editor, custom or not. –>
    <xcdg:Column FieldName=”Category”
    Width=”100″
    CellEditor=”{StaticResource categoryEditor}”
    CellContentTemplate=”{StaticResource categoryCellDataTemplate}”/>
    <xcdg:Column FieldName=”Country”/>
    <xcdg:Column FieldName=”Rating”/>
    <!– Invisible columns –>
    <xcdg:Column FieldName=”SongID”
    Visible=”False”/>
    </xcdg:DataGridControl.Columns>
    </xcdg:DataGridControl>
    </DockPanel>
    </Page>

    Imported from legacy forums. Posted by Phil (had 525 views)

    Xceed Support
    Member
    Post count: 5658

    I tried the installed sample and there weren’t any problems. Did you make any modifications to the sample or is it in its original state?

    If you check the output window, are there any binding errors?

    That said, does sample give you the same behavior in the Live Explorer (they use the same code)?

    If you reinstall the package, does the sample work?

    “I wish this forum had a file upload feature for screen shots. “

    The new forums and community site are coming soon (don’t have a timeframe) and are night and day with the current forums and you will be able to upload images and projects.

    That said, if the suggestions above don’t work, zip up the sample and a screen shot and send it to support@xceedsoft.com at me attention.

    Imported from legacy forums. Posted by Jenny [Xceed] (had 167 views)

    User (Old forums)
    Member
    Post count: 23064

    Jenny,

    I had done a reinstall of the samples from the msi before, and the only one that worked was the stat functions one. All were able to be built successfully, but upon running, there is a xaml error in the main page. This is mentioned in someone else’s forum post, saying we have to wait till the next release. I will uninstall completely and reinstall and see if I can fix anything. I had version 1.0 previously installed on the machine, but had deleted all the 1.0 dll’s, but did not use gactutil to remove anything.

    Imported from legacy forums. Posted by Phil (had 926 views)

    Xceed Support
    Member
    Post count: 5658

    Are you using VS 2008?

    Imported from legacy forums. Posted by Jenny [Xceed] (had 241 views)

    User (Old forums)
    Member
    Post count: 23064

    Jenny,

    I’m using Vs2005. I also have Vs2008 Beta 2 installed. I did try to run the sample solution file in Vs2008, but when you hit F5, the screen blinks and nothing, absolutely nothing happens.

    Imported from legacy forums. Posted by Phil (had 614 views)

    Xceed Support
    Member
    Post count: 5658

    Hi,

    The .NET 3.5 beta introduced some changes in the .NET 3.0 DLLs…

    Those changes impact the way the DataGridCollectionView gets “detected” by the DataGridControl.

    To “workaround” this problem, you need to bind to:

    <DataGridControl ItemsSource=”{Binding Source={StaticResource xyz}, <b>Path=View</b>}” />

    The good news is: this workaround will also work on the original .NET 3.0 release.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 428 views)

    User (Old forums)
    Member
    Post count: 23064

    Per Marcus’ suggestions, changed the page, now am getting:
    System.Windows.Markup.XamlParseException was unhandled
    Message=”‘GroupLevelIndicatorPane’ object cannot be added to ‘Grid’. ‘GroupLevelIndicator’ TargetType does not match type of element ‘GroupLevelIndicatorPane’. Error at object ‘Xceed.Wpf.DataGrid.GroupLevelIndicatorPane’ in markup file ‘Xceed.Wpf.DataGrid;;;component/themes/Common/TableView.GridElementTemplates.xaml’.”
    Source=”PresentationFramework”
    LineNumber=0
    LinePosition=0
    NameContext=”groupLevelIndicatorPane”

    Per Andre, maybe the defaultTheme setting is the problem? Tried “silverTheme”, doesn’t work. Code page below:

    <!–
    Xceed DataGrid for WPF – SAMPLE CODE – Dynamic Editor Display Sample Application
    Copyright (c) 2005-2007 Xceed Software Inc.

    [MainPage.xaml]

    This Page contains the UI declarations of the Dynamic Editor Display sample.

    This file is part of the Xceed DataGrid for WPF product. The use
    and distribution of this Sample Code is subject to the terms
    and conditions referring to “Sample Code” that are specified in
    the XCEED SOFTWARE LICENSE AGREEMENT accompanying this product.
    –>

    <Page x:Class=”Xceed.Wpf.DataGrid.Samples.DynamicEditorDisplay.MainPage”
    xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;
    xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml&#8221;
    xmlns:xcdg=”http://schemas.xceed.com/wpf/xaml/datagrid&#8221;
    xmlns:local=”clr-namespace:Xceed.Wpf.DataGrid.Samples.DynamicEditorDisplay”
    xmlns:s=”clr-namespace:System;assembly=mscorlib”>
    <Page.Resources>
    <xcdg:DataGridCollectionViewSource x:Key=”cvsSongs”
    Source=”{Binding Source={x:Static Application.Current},Path=Songs}”>
    </xcdg:DataGridCollectionViewSource>

    <x:Array x:Key=”cellEditorDisplayConditionsList”
    Type=”{x:Type local:CellEditorDisplayConditionsItem}”>
    <local:CellEditorDisplayConditionsItem CellEditorDisplayConditions=”MouseOverCell”
    Description=”Mouse over cell”
    ToolTip=”A cell’s editor is displayed when the mouse passes over a cell.”
    IsChecked=”True”/>
    <local:CellEditorDisplayConditionsItem CellEditorDisplayConditions=”MouseOverRow”
    Description=”Mouse over row”
    ToolTip=”All the cell editors in a row are displayed when the mouse passes over a row.”
    IsChecked=”False”/>
    <local:CellEditorDisplayConditionsItem CellEditorDisplayConditions=”CellIsCurrent”
    Description=”Cell is current”
    ToolTip=”A cell’s editor is displayed when it is current.”
    IsChecked=”False”/>
    <local:CellEditorDisplayConditionsItem CellEditorDisplayConditions=”RowIsCurrent”
    Description=”Row is current”
    ToolTip=”All the cell editors in a row are displayed when the row is current.”
    IsChecked=”False”/>
    <local:CellEditorDisplayConditionsItem CellEditorDisplayConditions=”RowIsBeingEdited”
    Description=”Row is being edited”
    ToolTip=”All the cell editors in a row are displayed when one of the cells in a row is being edited.”
    IsChecked=”False”/>
    <local:CellEditorDisplayConditionsItem CellEditorDisplayConditions=”Always”
    Description=”Always”
    ToolTip=”Cell editors are always displayed. Including this value will have a significant negative impact on performance.”
    IsChecked=”False”/>
    </x:Array>

    <x:Array x:Key=”editTriggersList”
    Type=”{x:Type local:EditTriggersItem}”>
    <local:EditTriggersItem EditTriggers=”SingleClick”
    Description=”Single click”
    ToolTip=”Cells will enter edit mode when it is clicked.”
    IsChecked=”True”/>
    <local:EditTriggersItem EditTriggers=”ClickOnCurrentCell”
    Description=”Click on current cell”
    ToolTip=”The current cell will enter edit mode when it is clicked.”
    IsChecked=”False”/>
    <local:EditTriggersItem EditTriggers=”CellIsCurrent”
    Description=”Cell is current”
    ToolTip=”A cell will enter edit mode when it becomes current. Either via a mouse click, a keyboard navigation, etc.”
    IsChecked=”False”/>
    <local:EditTriggersItem EditTriggers=”RowIsCurrent”
    Description=”Row is current”
    ToolTip=”All cells in a row will enter edit mode when the row becomes current. Either via a mouse click, a keyboard navigation, etc. ”
    IsChecked=”False”/>
    <local:EditTriggersItem EditTriggers=”BeginEditCommand”
    Description=”Edit command (e.g., F2)”
    ToolTip=”Cells will enter edit mode when the BeginEditCommand (default F2) is sent to the containing DataRow.”
    IsChecked=”False”/>
    <local:EditTriggersItem EditTriggers=”ActivationGesture”
    Description=”Gesture (e.g., key press)”
    ToolTip=”Cells will enter edit mode when the user performs the appropriate activation gesture for the current cell’s editor.”
    IsChecked=”False”/>
    </x:Array>

    <ItemsPanelTemplate x:Key=”groupBoxItemsPanelTemplate”>
    <WrapPanel ItemWidth=”145″/>
    </ItemsPanelTemplate>

    <DataTemplate x:Key=”cellEditorDisplayConditionsItemTemplate”
    DataType=”local:CellEditorDisplayConditionsItem”>
    <CheckBox Content=”{Binding Description}”
    Margin=”{StaticResource configItemMargin}”
    IsChecked=”{Binding IsChecked}”
    ToolTip=”{Binding ToolTip}”
    Checked=”CellEditorDisplayConditionsChanged”
    Unchecked=”CellEditorDisplayConditionsChanged”/>
    </DataTemplate>

    <DataTemplate x:Key=”editTriggersItemTemplate”
    DataType=”local:EditTriggersItem”>
    <CheckBox Content=”{Binding Description}”
    Margin=”{StaticResource configItemMargin}”
    IsChecked=”{Binding IsChecked}”
    ToolTip=”{Binding ToolTip}”
    Checked=”EditTriggersChanged”
    Unchecked=”EditTriggersChanged”/>
    </DataTemplate>

    <!– This simple Cell Template makes sure that the Cell’s height will never
    be less than its Cell Editor Height. That way, if the Editor is displayed
    on MouseOver, there will be no “wobbling” of the Row. This is a purely a
    cosmetic step. –>
    <DataTemplate x:Key=”categoryCellDataTemplate”>
    <TextBlock Text=”{Binding}”
    MinHeight=”22″
    TextTrimming=”{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type xcdg:Cell}}, Path=ParentColumn.TextTrimming}”
    TextWrapping=”{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type xcdg:Cell}}, Path=ParentColumn.TextWrapping}”/>
    </DataTemplate>

    <!– This is a very straightforward ComboBox

    Imported from legacy forums. Posted by Phil (had 1323 views)

    Xceed Support
    Member
    Post count: 5658

    This is a known issue:

    http://forums.xceed.com/forums/ShowPost.aspx?PostID=8830

    Imported from legacy forums. Posted by Jenny [Xceed] (had 267 views)

    User (Old forums)
    Member
    Post count: 23064

    Jenny,

    Using Marcus’ post on that thread, repeated below fixes it.
    Instead of a newbie to the grid getting an ulcer hunting around all these threads, can you place a sticky
    forum post at the top of the forum explicitly stating something like “READ THIS FOR V1.2 SAMPLE BUILDING” or something in bold caps!!

    Phil

    ***********************************************************************
    Marcus Post:

    I have been able to narrow down the repro conditions and here is the problem:

    Issue will happen when in table view for users whose OS theme is “XP Silver” ( Luna.Metallic ) or for those that “force” it using UxTheme.

    The proposed workaround is to explicitly set the appropriate theme on the DataGridControl:

    <DataGridControl View=”TableView.Luna.Metallic” />

    This way, the appropriate look will appear on the DataGridControl…

    The next service release will contain the fix for this issue.

    Thank you for reporting this to our attention.

    ——————————————————————————–

    Imported from legacy forums. Posted by Phil (had 7260 views)

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.