Hello,
I have a problem with the custom sort in Oracle data base with a empty string and your RadGrid. When I use a custom sort in your RadGrid, the object result list it’s ok, but in the grid, the result isn’t the same. But, if I use buttons to sort the grid with the same query, the result it’s correct in my grid. I think the grid sort again my objects list in the SortCommand.
In Sql server, I have no problem with the same query. In Oracle, the empty value isn’t sort of the same order as Sql Server. But why the grid sorts again my list of objects ?
Exemple code for custom sort :
Private Sub grdDetailTelerik_SortCommand(sender As Object, e As Telerik.Web.UI.GridSortCommandEventArgs) Handles grdDetailTelerik.SortCommand
Dim sortingField As String = e.SortExpression
Dim sortingOrder As String = e.NewSortOrder
ActualResultPage = 0
SetLastViewPage(0)
SortColumn = sortingField
SortDirection = sortingOrder
grdDetailTelerik.DataSource = GetData(True) 'Get all of objet with my query
grdDetailTelerik.Rebind()
End Sub
Custom sort :
SortColumn = Code
SortDirection = Ascending
Result list of Objet(Oracle) :
Code = 001.0.0
Code = 001.0.0
Code = 001.0.0
Code = 001.0.0
Code = 001.0.0
Code = 001.0.0
Code = 001.0.0
Code = 099.9.0
Code = 099.9.0
Code = String.empty
Code = String.empty
Result list of Objet (Sql Server) :
Code = String.empty
Code = String.empty
Code = 001.0.0
Code = 001.0.0
Code = 001.0.0
Code = 001.0.0
Code = 001.0.0
Code = 001.0.0
Code = 001.0.0
Code = 099.9.0
Code = 099.9.0
Result in grid(Oracle), the order of sort isn’t ok in this example, my empty string is in top, but :
Page 1 :
oracle_page1.png
Page 2 :
oracle_page2.png
Result in grid (Sql server) is ok:
Page 1 :
sql_page1.png
sql_page2.png
Sorry but I can not give you the entire code, I only submiting the list of objects and the result in the grid.
If you need another example, I will provide you, if it's possible
Thank's in advance !!