Telerik Forums
Kendo UI for jQuery Forum
0 answers
86 views
Hello,

in my scenario i need to get data from server every time when user expands the node.
Based on this working example i could manage to add some additional "static" parameters to the request by using "parameterMap". Those are sent while each expand-request and handled by the server.

var dataSource = new kendo.data.DataSource({
     transport
: {
       read
: "Catalog/Titles",
       parameterMap
: function(data, type) {
         
return {
             request_goes_to : responsible_server_control_id
          }
       
}
     
}
 
});

But what i need to do is:
Each node must hold some values apart from their ids which must be sent to server while expanding these nodes.
Is there a way to force nodes to hold other values than text and id? In my application it is not possible to populate childs of an object only using its id.

thanks in advance,
Koray.

Koray
Top achievements
Rank 1
 asked on 20 Aug 2012
2 answers
154 views

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.

Gregor
Top achievements
Rank 1
 answered on 20 Aug 2012
0 answers
253 views
Hi All,

I want to sort my kendo grid columns only in "ascending" or "descending" order how can achive this.
i used below possible configurations. but i didn't get the expected behaviour.
1) "sortable: true" 
2) sortable: { mode: 'single' }, 
3) sortable: { mode: 'multiple' },


Thanks,
Praneeth.
Pra
Top achievements
Rank 1
 asked on 20 Aug 2012
0 answers
97 views
Hi all, how I can render grid in template?
Thanks.
Marat
Top achievements
Rank 1
 asked on 20 Aug 2012
0 answers
97 views
please remove
Admin
Top achievements
Rank 1
 asked on 20 Aug 2012
0 answers
44 views

I am using Kendo UI MVC wrappers for my project . Here is a sample POST data during an update call:

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

I've used client-side ajax binding. All non-flattened model variables have two sets of data in post call.

Also earlier when using telerik MVC model decorated with read-only data annotations wont be posted during update call, but not any more.
While migrating from telerik MVC to kendo UI MVC, am facing some issues with non-flattened variables. 

Do I have to handle all these cases manually in client js events or am i doing something wrong?
Fredy
Top achievements
Rank 1
 asked on 19 Aug 2012
0 answers
116 views
hi

I have a piece of my web service code here and i wondering if this webservice is good enough to be used with json? How should i call it with json? Thanks a lot

<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

L
Top achievements
Rank 1
 asked on 19 Aug 2012
11 answers
3.5K+ views

I will make my query really simple,

I have a database in my local sqlServer

I need to bind a table to Kendo Data Source using sql connection

Is there any way to achive this ?

please post a sample application in asp.net.
Agostino
Top achievements
Rank 1
 answered on 18 Aug 2012
1 answer
270 views
Updated for clarity:

The client side grid sorting example creates data locally and assigns that data to the kendo grid rather than fetching it via a dataUrl. I am fetching the data initially via a dataUrl and setting all the properties of the dataSource.transport correctly with the autoBind set to true on the grid. After this initial fetch, I want to disconnect and have sorting/paging/filtering occur strictly client side. Is this possible?

I've not been able to get a definitive answer on this from the documentation or via numerous Google searches.  No matter what I set the datasource's serverSorting property to, I get a post to the server which resets my data.  I simply want to sort the data client side, even when it is dirty and not hit the server.    

I have wrapped the kendo grid in our own widget and have added lots of code to add/remove functionality to the kendo grid that we needed (or didn't want).  I can trap the click of the header and do our own sorting of the client data source if I have to, but before I go down that road, I want to make sure that kendo grid does NOT support a true client-side ONLY sorting.  

Thanks in advance for your time,
Rik  

Ryan
Top achievements
Rank 2
 answered on 18 Aug 2012
1 answer
339 views
I was trying to format the date in the grid.
The grid uses a editortemplate for editing date.
@model DateTime
@{
    
}
@Html.TextBoxFor(model => model, string.Format("{0:d}", Model), new { disabled="true" })

The date never gets formatted.
It always defaults to this format in the grid:
17 2012 13:36:07 GMT-0500 (Central Daylight Time)


On postback, this causes  ModelState to return error.
Ryan
Top achievements
Rank 2
 answered on 18 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?