Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
540
UnboundColumn IsSortable property always false when access in code behind
posted

I am setting IsSorting property for unbound column in xaml. When accessing the property in code behind its always false even if I set the IsSortable property to true in xaml

Here what I am doing. In Xaml

                <Grids:UnboundColumn Key="FirstName" HeaderText="First Name" Width="200"                 IsSortable="True"   IsFilterable="true"  IsReadOnly="False">
                    <Grids:UnboundColumn.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding RowData.FirstName}" />
                        </DataTemplate>
                    </Grids:UnboundColumn.ItemTemplate>

               </Grids:UnboundColumn>

In code behind :

foreach (var col in this.FilterGrid.Columns)
{
    if (col.GetType() == typeof(UnboundColumn))
    {
       var column = col as UnboundColumn;
 bool test= column.IsSortable
     }
}

IsSortable property returns always false.Whereas other properties like IsFilterable,IsReadOnly etc works fine.

I will appreciate if any one has a fix for  this