Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Problem with column sorting.  (Read 640 times)

0 Members and 1 Guest are viewing this topic.

Stuart

  • Guest
Problem with column sorting.
« on: April 29, 2010, 12:58:00 AM »
Hello,

I am evaluating the tree view control and I have a question regarding column sorting.

My system details are as follows;
Flexible TreeView version 2.5
Visual Studio 2008
Win XP SP3

I have built a demo application for testing and populated the tree with data. Please refer to the attached screen shot. The first column has a NodeTextBox control attached and the remaining columns have NodeNumeric controls attached.

When the first column is sorted the results are as expected. However, when one of the numeric columns is sorted it appears that the sorting algorythm is only sorting based on the first character in the number.

Is this result as you expect or have I made an error?

My new node class inherits from the Node class as shown below.

Code: [Select]
Public Class NodeWithColumns
    Inherits ARMSoft.FlexibleTreeView.Nodes.Node

    'Item is represented in the Text member
    Private m_col1Data As String 'ItemDescription
    Private m_col2Data As Integer 'MTDUnitTotal
    Private m_col3Data As Single 'MTDDollarTotal
    Private m_col4Data As Integer 'LYSamePeriodUnitTotal
    Private m_col5Data As Single 'LYSamePeriodDollarTotal
    Private m_col6Data As Integer 'UnitAvgPerMonth
    Private m_col7Data As Integer 'YTDUnitTotal
    Private m_col8Data As Single 'YTDDollarTotal
    Private m_col9Data As Integer 'LYUnitTotal
    Private m_col10Data As Single 'LYDollarTotal

    Public Property col1Data() As String
        Get
            Return m_col1Data
        End Get
        Set(ByVal value As String)
            m_col1Data = value
        End Set
    End Property
...

I am loading the data from an SQLReader as follows;
Code: [Select]
            If reader.HasRows = True Then
                Do While reader.Read
                    Dim n0 As New NodeWithColumns

                    Select Case strMode
                        Case "ByProductGroup"
                            n0.AttachTo(tv)
                        Case "ByProduct"
                            n0.AttachTo(tv.SelectedNode)
                    End Select

                    n0.Text = CStr(reader(0)) 'Item
                    n0.col1Data = CStr(reader(1)) 'ItemDescription
                    n0.col2Data = CInt(reader(2)) 'MTDUnitTotal
                    n0.col3Data = CSng(reader(3)) 'MTDDollarTotal
                    n0.col4Data = CInt(reader(4)) 'LYSamePeriodUnitTotal
                    n0.col5Data = CSng(reader(5)) 'LYSamePeriodDollarTotal
                    n0.col6Data = CInt(reader(6)) 'UnitAvgPerMonth
                    n0.col7Data = CInt(reader(7)) 'YTDUnitTotal
                    n0.col8Data = CSng(reader(8)) 'YTDDollarTotal
                    n0.col9Data = CInt(reader(9)) 'LYUnitTotal
                    n0.col10Data = CSng(reader(10)) 'LYDollarTotal
                Loop
            End If


Thanks for your help. I am really enjoying your control.

Regards,
Stu.

Ruslan

  • Flexible TreeView Team
  • Sr. Member
  • *****
  • Offline Offline
  • Posts: 496
Re: Problem with column sorting.
« Reply #1 on: April 29, 2010, 02:09:28 AM »
Hello Stuart,

Welcome to forums and thank you for your feedback, this is very important for us.

As to this problem: yes, this`s a known bug and it is already fixed and will be available in the forthcoming new release. If you need this fix ASAP we can send you the new version within couple of days.
New release also comes with some new and useful features: new node control to display and edit the date/time, 20x data access performance increase, VS2010 support and much more...
Also, now we`re on the middle of way of porting Flexible TreeView to Silverlight, WPF and Windows Phone 7.

Feel free to contact us if you have any other questions.

Stuart

  • Guest
Re: Problem with column sorting.
« Reply #2 on: April 29, 2010, 03:28:31 AM »
Thank you Ruslan.

Yes please. Could you send me the latest version ASAP.

If I can demonstrate that the sorting will work correctly I will be given permission to purchase a license.

Regards,

Stu:)

Stuart

  • Guest
Re: Problem with column sorting.
« Reply #3 on: April 29, 2010, 03:32:40 AM »
By the way Ruslan,

Am I loading data from my database in the most efficient way, using the SQLReader?

Regards,

Stu:)

Ruslan

  • Flexible TreeView Team
  • Sr. Member
  • *****
  • Offline Offline
  • Posts: 496
Re: Problem with column sorting.
« Reply #4 on: April 29, 2010, 03:43:33 AM »
Ok, we`ll send you the fixed version ASAP.

Yes, your way (using a sqldatareader) is the most efficient way to fill the tree because the datareader itself is very lightweight/fast data access component.
The data bound mode is the No.1 priority task for us right now and soon we`ll release new version with complete bound/unbound data source modes which will be very flexible and easy to use.

Ruslan

  • Flexible TreeView Team
  • Sr. Member
  • *****
  • Offline Offline
  • Posts: 496
Re: Problem with column sorting.
« Reply #5 on: May 03, 2010, 01:43:43 PM »
Hello Stuart,

Please check your e-mail box for a fixed version of Flexible TreeView.
Please contact us if you have any other issue.

Ruslan

  • Flexible TreeView Team
  • Sr. Member
  • *****
  • Offline Offline
  • Posts: 496
Re: Problem with column sorting.
« Reply #6 on: May 03, 2010, 01:52:43 PM »
Unfortunately your e-mail server have rejected our e-mail because of the message size. Please provide other e-mail without this problem.
 

Copyright © 2006-2012 ARMSoft. All rights reserved.