After sorting unable to get the correct value via code...

2 posts, 0 answers
  1. Johnny
    Johnny avatar
    86 posts
    Member since:
    Dec 2010

    Posted 20 Dec 2011 Link to this post

    Hi!... I had a datagrid which i had i column "File Name". In File Name column i had a  to z value....
    Im using 2011 Q2 control and VB.NET 2010
    I use datasource to bind the value to my datagrid. I able to sort the value from assending to desending....
    The datagrid also show me correctly from a - z become z - a.

    after sorting i will use... the code  below to get the value:

    Dim FileN as String = ""
    For i = 0 to RadGridView1.rowcount - 1
     FileN = RadGridView1.Rows(i).Cells(0).Value

    after desending it i can't the get  "z" as the first value... it still give me the value "a".
    May i know how to do that? it's need urgently because i change the current .net datagrid to telerik gridView for user.
    Thank You!


  2. Stefan
    Stefan avatar
    2908 posts

    Posted 23 Dec 2011 Link to this post

    Hi Johnny,

    Thank you for writing. 

    The reason for the observed behavior is the fact that the rows with their correct order after performing sorting/filtering/grouping are placed in the ChildRows collection of RadGridView, and not in the Rows collection of the control. Detailed explanation of both collections, can be found in the following help article:

    A bit off topic, I would like to remind you that your subscription package has expired, which means that you are no longer entitled for our support services. I would highly recommend upgrading your license to the latest version in order to continue getting product updates and uninterrupted support services. Please, contact or visit your account for your upgrading options.

    I hope that you find this information helpful.
    the Telerik team

    of RadControls for WinForms is available for download (see what's new). Get it today.
Back to Top