Sort DataGridColumn with IP Address

Grids for WPF Forum

Posted 1 year ago by Sebastian Wrba - M.Sc., WSE GmbH
Version: 18.1.0673
Avatar

Hi there, 

I have DataGrid whitch is binded to a MySQL table. I have defined the rows using: DataGridTextColumn Binding="{Binding Path=ip}".

When I try to order the DataGrid by clicking the Header it sorts the IP row like a string and so the results are not what I had expected.

What can I do?

thanks a lot

Comments (3)

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

For questions on the native WPF DataGrid, you should post in the Microsoft forums for WPF controls instead since they are the authors of that control.  But doing a quick web search, I found this article that may help:

http://mikestedman.blogspot.com/2012/07/wpf-datagrid-custom-column-sorting.html


Actipro Software Support

Posted 1 year ago by Sebastian Wrba - M.Sc., WSE GmbH
Avatar

Thanks so far, 

but you get me wrong, I use the Actipro Control datagrid:ThemedDataGrid

 

<datagrid:ThemedDataGrid SelectionUnit="FullRow" ItemsSource="{Binding}">
<datagrid:ThemedDataGrid.Columns>
<datagrideditors:DataGridTextColumn Binding="{Binding Path=ip}" >

...

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Sebastian,

The ThemedDataGrid just has a couple free open source extensions we made for the native WPF DataGrid control.  It's not a true custom control created by us like the other controls that we sell.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.