This is a migrated thread and some comments may be shown as answers.

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

1 Answer 22 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Johnny
Top achievements
Rank 2
Johnny asked on 20 Dec 2011, 06:45 PM
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
  msgbox(FileN)
Next

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!

Regards
Johnny


1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 23 Dec 2011, 10:24 AM
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: http://www.telerik.com/help/winforms/gridview-rows-rows-vs-childrows.html.

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 sales@telerik.com or visit your account for your upgrading options.

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

Q3’11
of RadControls for WinForms is available for download (see what's new). Get it today.
Tags
GridView
Asked by
Johnny
Top achievements
Rank 2
Answers by
Stefan
Telerik team
Share this question
or