locked
sorting data in DataGridTemplateColumn RRS feed

  • Question

  • I have three column.

    1.DataGridTemplateColumn

    2. DataGridTextColumn

    3. DataGridTextColumn

    I am able to sort  DataGridTextColumn but not able to allow users to sort  DataGridTemplateColumn. I tried 

    Xaml 

    <data:DataGridTemplateColumn Header="JT" SortMemberPath="JT">

    .cs

      public string SortMemberPath { get; set; }

    But no use.Could anyone help me on this?

    Thanks in Advance

       

    Monday, May 7, 2012 9:18 AM

Answers

  • Hi All,

    I found my mistake.

    data:DataGridTemplateColumn Header="JT" SortMemberPath=" ">

    The sortmemberpath should be binding text name.

    I referred the below site

    -----------------------------

    http://www.a2zmenu.com/Blogs/Silverlight/Datagrid-TemplateColumn-Sorting-in-Silverlight-3.aspx

    Thanks a lot

    Monday, May 7, 2012 9:29 AM