var dataSource = new kendo.data.DataSource({
transport: {
read: "Catalog/Titles",
parameterMap: function(data, type) {
return {
request_goes_to : responsible_server_control_id
}
}
}
});
Hello,
I've made and example here http://jsfiddle.net/gmocnik/tXEwV/2/. The problem is the clientside sorting does not work for characthers like (č, ž, š). The second thing is, that in documentation is written "Refresh method redraws the grid using the current data of the DataSource.", but if you turn autoBind parameter to false and call grid.refresh(), nothing happens, is that OK?
Thank you in advance for help.
Category.Text Excluded
Category.Value 0
Category[Text] Excluded
Category[Value] 0
HiddenDevice false
ID 8
IconType 3
Info.IPAddress 10.200.93.125
Info.Model xxx
Info.SerialNumber xxx
Info[IPAddress] 10.200.93.125
Info[Model] xxx
Info[SerialNumber] xxx
Name xxx
Status.Type Connected
Status[Type] Connected
Trigger.ID 1
Trigger.Name xxx
Trigger[ID] 1
Trigger[Name] xxx
filter
group
sort
<WebMethod(Description:="Sales")> _
Public Function Sales(ByVal Region as String) as SalesClass()
Dim ds As New DataTable
ds = getSales(Region)
Dim newSales as SalesClass() = new SalesClass(ds.Rows.Count - 1) {}
Dim i As Integer
For i = 0 To ds.Rows.Count - 1
newSales(i) = New SalesClass()
If Not DBNull.Value.Equals(ds.rows(i)(0)) then
newSales(i).Region = ds.rows(i)(0)
End If
If Not DBNull.Value.Equals(ds.rows(i)(1)) then
newSales(i).Product = ds.rows(i)(1)
End If
If Not DBNull.Value.Equals(ds.rows(i)(2)) then
newSales(i).Amount = ds.rows(i)(2)
End If
If Not DBNull.Value.Equals(ds.rows(i)(3)) then
newSales(i).TimeFrame = ds.rows(i)(3)
End If
Next
Return newSales
End Function
Public Class SalesClass
Public Region as System.String
Public Product as System.String
Public Amount as System.Decimal
Public TimeFrame as System.String
End Class
Public function getSales(Region as String) as Datatable
Dim cn as new SqlConnection("Data Source=local;Initial Catalog=MyDB;Persist Security Info=True;User ID=sa;password=password")
Dim cmd As new SqlCommand("SELECT Region, Product, Amount ,TimeFrame FROM dbo.Transaction where Region = @Region", cn)
Dim p0 As New SqlParameter
p0.ParameterName ="@Region"
p0.Value = Region
cmd.Parameters.Add(p0)
cn.Open()
Dim da As New SqlDataAdapter(cmd)
Dim dtResults As New DataTable
Try
da.Fill(dtResults)
Catch ex As Exception
da.Dispose()
dtResults.Dispose()
MsgBox("Something went wrong - please check the query string")
Finally
cn.Close()
da.Dispose()
End Try
Return dtResults
End Function