Home Forums WPF controls Xceed DataGrid for WPF DataGrid sorting question

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

    For some reason when I click on a grid column to sort the data, it doesnt sort correctly. The information just doesnt group together. The same thing happens if I drag a column for grouping. What am I doing wrong or could be wrong?

    Code:
    <Window x:Class=”XceedApp1.Window1″
    xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation&#8221;
    xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml&#8221;
    Title=”XceedApp1″ Height=”521″ Width=”824″
    xmlns:xcdg=”http://schemas.xceed.com/wpf/xaml/datagrid&#8221;
    xmlns:d=”http://schemas.microsoft.com/expression/blend/2006&#8243;
    xmlns:s=”clr-namespace:System;assembly=mscorlib”
    >
    <Window.Resources>
    <XmlDataProvider Source=”C:\Projects\Testarea\XceedApp1\TaskList.xml” x:Key=”ArrayOfTaskListDS”/>
    </Window.Resources>

    <Grid>
    <xcdg:DataGridControl x:Name=”TaskListGrid” ItemsSource=”{Binding Mode=OneWay, Source={StaticResource ArrayOfTaskListDS}, XPath=ArrayOfTaskList/TaskList}” >
    <xcdg:DataGridControl.Columns>
    <xcdg:Column Title=”Id”
    FieldName=”Id”
    Width=”40″
    DisplayMemberBinding=”{Binding XPath=Id}”/>
    <xcdg:Column Title=”Date”
    FieldName=”Date”
    Width=”55″
    DisplayMemberBinding=”{Binding XPath=Date}”/>
    <xcdg:Column Title=”Sender”
    FieldName=”Sender”
    Width=”100″
    DisplayMemberBinding=”{Binding XPath=Sender}”/>
    <xcdg:Column Title=”Subject”
    FieldName=”Subject”
    Width=”200″
    DisplayMemberBinding=”{Binding XPath=Subject}”/>
    <xcdg:Column Title=”Name”
    FieldName=”Name”
    Width=”100″
    DisplayMemberBinding=”{Binding XPath=Name}”/>
    <xcdg:Column Title=”PatientPic”
    FieldName=”PatientPic”
    Width=”200″
    DisplayMemberBinding=”{Binding XPath=PatientPic}”/>
    <xcdg:Column Title=”Problems”
    FieldName=”Problems”
    Width=”100″
    DisplayMemberBinding=”{Binding XPath=Problems}”/>
    <xcdg:Column Title=”Urgency”
    FieldName=”Urgency”
    Width=”100″
    DisplayMemberBinding=”{Binding XPath=Urgency}”/>
    <xcdg:Column Title=”To”
    FieldName=”To”
    Width=”100″
    DisplayMemberBinding=”{Binding XPath=To}”/>
    <xcdg:Column Title=”CC”
    FieldName=”CC”
    Width=”100″
    DisplayMemberBinding=”{Binding XPath=CC}”/>
    <xcdg:Column Title=”Contact”
    FieldName=”Contact”
    Width=”100″
    DisplayMemberBinding=”{Binding XPath=Contact}”/>
    <xcdg:Column Title=”Phone”
    FieldName=”Phone”
    Width=”100″
    DisplayMemberBinding=”{Binding XPath=Phone}”/>
    <xcdg:Column Title=”PhType”
    FieldName=”PhType”
    Width=”100″
    DisplayMemberBinding=”{Binding XPath=PhType}”/>
    <xcdg:Column Title=”Text”
    FieldName=”Text”
    Width=”200″
    DisplayMemberBinding=”{Binding XPath=Text}”/>
    <xcdg:Column Title=”Note”
    FieldName=”Note”
    Width=”200″
    DisplayMemberBinding=”{Binding XPath=Note}”/>
    </xcdg:DataGridControl.Columns>
    </xcdg:DataGridControl>

    </Grid>
    </Window>

    Data:
    <?xml version=”1.0″ encoding=”utf-8″ ?>
    <ArrayOfTaskList xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xmlns:xsd=”http://www.w3.org/2001/XMLSchema”&gt;
    <!– Messages.xml –>
    <TaskList>
    <Id>217</Id>
    <Date>4/24/06</Date>
    <Sender>M. Stewart</Sender>
    <Subject>Consult Requested</Subject>
    <Name>Jamie</Name>
    <PatientPic>\Patient Photo\01.jpg</PatientPic>
    <Problems>lung cancer</Problems>
    <Urgency>Normal</Urgency>
    <To>Sharon</To>
    <CC></CC>
    <Contact>Dave Johnson</Contact>
    <Phone>413-3334</Phone>
    <PhType>Home</PhType>
    <Text>Contact Bob at Hospital Maintenance tell him we need 3 new phone jacks in waiting room</Text>
    </TaskList>
    <TaskList>
    <Id>225</Id>
    <Date>4/25/06</Date>
    <Sender>M. Stewart</Sender>
    <Subject>School Physical</Subject>
    <Name>Kevin</Name>
    <PatientPic>\Patient Photo\03.jpg</PatientPic>
    <Problems>hypothyroIdism</Problems>
    <Urgency>High</Urgency>
    <To>Barbara</To>
    <CC></CC>
    <Contact></Contact>
    <Phone></Phone>
    <PhType></PhType>
    <Text>Need to leave the office early today for an important meeting, Dr J</Text>
    </TaskList>
    <TaskList>
    <Id>233</Id>
    <Date>4/26/06</Date>
    <Sender>M. Stewart</Sender>
    <Subject>PT Authorization</Subject>
    <Name>Viraj</Name>
    <PatientPic>\Patient Photo\05.jpg</PatientPic>
    <Problems>hypertension</Problems>
    <Urgency>Normal</Urgency>
    <To>Dave</To>
    <CC></CC>
    <Contact></Contact>
    <Phone></Phone>
    <PhType></PhType>
    <Text>Can you make sure my wife picked up the groceries, thanks Dr. J</Text>
    </TaskList>
    <TaskList> SDJXCEE

    Imported from legacy forums. Posted by keith (had 5958 views)

    User (Old forums)
    Member
    Post count: 23064

    I noticed in the release notes for the version I downloaded that there is a KNOWN ISSUE that sorting with XML-based datasets is not working yet.

    Imported from legacy forums. Posted by Marty (had 617 views)

    User (Old forums)
    Member
    Post count: 23064

    Indeed, we do not support sorting XML data sources yet. In the meantime, I’ll try to come up with a workaround for those who need to do it. I’ll post it here when it’s ready.

    Imported from legacy forums. Posted by Pascal (had 296 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks. Please let me know once this is fixed by pposting here. We do alot with xml. Is there an issue with clr dataobjects?

    Imported from legacy forums. Posted by keith (had 264 views)

    User (Old forums)
    Member
    Post count: 23064

    CLR data objects work fine!

    Imported from legacy forums. Posted by Pascal (had 393 views)

    User (Old forums)
    Member
    Post count: 23064

    If you are binding to a collection (or anything that inherits from BindingList<T>) you may need to wrap the object inside of a ListCollectionView. See this thread for more details:

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

    Imported from legacy forums. Posted by Scott (had 516 views)

    User (Old forums)
    Member
    Post count: 23064

    This has been fixed. Unfortunately, the fix did not make it in time for the update package we released today… The fix will be available in the next service release.

    Imported from legacy forums. Posted by Pascal (had 411 views)

    User (Old forums)
    Member
    Post count: 23064

    A fix has been implemented and the main download package will be updated soon.

    Meanwhile you can download it using this link:

    http://download3.xceedsoft.com/Packages/3.0.7170.16360/XceedComponentsWebInstall.exe

    Imported from legacy forums. Posted by Pascal (had 6898 views)

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