We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

sorted expression column

I have a grouping grid with number of decimal expression column. I have formatted the cell to "#,###;(#,###);-" . The problem is that when i try to sort these column, it seems to sort it as a string and not as decimals. Is there a way to resolve this? Below I have listed the function that adds to expression field. private void AddExpressionField(string fieldName, string expression) { ExpressionFieldDescriptor ed = new ExpressionFieldDescriptor(fieldName,expression,typeof(decimal)); gridPositionBrowser.TableDescriptor.ExpressionFields.Add(ed); GridColumnDescriptor columnDescriptor = new GridColumnDescriptor(fieldName); columnDescriptor.Appearance.AnyRecordFieldCell.Format = "#,##0;(#,##0);-"; columnDescriptor.Appearance.AnyCell.HorizontalAlignment = Syncfusion.Windows.Forms.Grid.GridHorizontalAlignment.Right; columnDescriptor.AllowGroupByColumn = false; gridPositionBrowser.TableDescriptor.Columns.Add(columnDescriptor); }

3 Replies

AD Administrator Syncfusion Team April 21, 2005 12:29 AM UTC

You can work around it handling the sort yourself using a custom comparer. Here is a little sample. http://www.syncfusion.com/Support/user/uploads/GGC_Expression_efe49d4d.zip


FH Faraz Haque April 21, 2005 03:32 AM UTC

Is this expected to be fixed in any realease soon? Also, do you know if sorting of summary rows will be supported any time soon? is there a workaround? I need to sort on summary rows in a grouped grid. If it will not be supported by syncfusion anytime soon, i may have to write a custom workflow, as the clients need it as a top priority. >You can work around it handling the sort yourself using a custom comparer. Here is a little sample. > >http://www.syncfusion.com/Support/user/uploads/GGC_Expression_efe49d4d.zip


AD Administrator Syncfusion Team April 21, 2005 02:40 PM UTC

Actually, this sorting problem is corrected in the 3.2.1.0 code base we are running in house. I see the problem with 3.0.1.0 but not 3.2.1.0.

Loader.
Live Chat Icon For mobile
Up arrow icon