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

Sortting on hyperlink column

3 Answers 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Phu
Top achievements
Rank 1
Phu asked on 14 Feb 2011, 09:52 AM
Dear All,

I have a radgrid which have some column with data value is html code, for examples of two the following data row :
  • <nobr><span><a href="/_layouts/userdisp.aspx?ID=9">Developing Lead-Hai Nguyen</a><img border="0" height="1" width="3" src="/_layouts/images/blank.gif"/><img border='0' height='12' width='12' class='ms-imnImg' src='/_layouts/images/blank.gif' alt='' /></span></nobr>
  • <nobr><span><a href="/subsite01/_layouts/userdisp.aspx?ID=14">Conductor Lead-Truc Bui</a><img border="0" height="1" width="3" src="/_layouts/images/blank.gif"/><img border='0' height='12' width='12' class='ms-imnImg' src='/_layouts/images/blank.gif' alt='' /></span></nobr>

And them will appear in radgrid with the link string as follow :
So when i sort this column to ascending, the result will appearing as follow :
And else when i sort this column to descending, it will appearing as follow :
I would like radgrid will show as the follow when i was sorted it :
- Ascending sort :
- Descending sort :
please help me solve this problem, thanks in advance.

Phu Dang.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Feb 2011, 11:15 AM
Hello,

Take a look at the documentation which describes on how to achieve sorting for GridHyperLinkColumn/GridTemplateColumn.
Sorting for GridHyperLinkColumn/GridTemplateColumn.

I hope this would shed some light on your issue.


-Shinu.
0
Phu
Top achievements
Rank 1
answered on 14 Feb 2011, 11:24 AM
Hi Shinu,

Thanks for your support.

Phu Dang
0
Phu
Top achievements
Rank 1
answered on 15 Feb 2011, 09:31 AM
Hi Shinu,

With the DataTable as describe above, first i create a radgrid's structure to datatable's structure and then i bind the DataTable above to RadGrid's DataSource property. The result will be appear as the image attached below after sort the AssignedTo column to descending. please give me a solution to solve this problem, thanks.

Phu Dang

Tags
Grid
Asked by
Phu
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Phu
Top achievements
Rank 1
Share this question
or