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

I have been trying to bind a json response to the grid. Essentially each record has an array of files that need to be show as a comma separated list on the last column. 

JSon response:  
[{"Id":"1","Title":"Sample","Description":"This is a sample","IsActive":"1","CreatedBy":"1","DocumentCategoryId":"1","files":
[{"filepath":"\uploads/download_assets/download1.jpg","doctypeext":"jpg","IconPath":"uploads/icons/icon-jpg.png"}]
}]

Script:
<script>
$(document).ready(function() {
  var dataSource = new kendo.data.DataSource({
   transport: {
    read: {
     url: "", // the remote service url
     dataType: "json"
    }
   }
  });
 
  $("#grid").kendoGrid({
   dataSource: dataSource,
    height: 360,
    groupable: false,
    scrollable: true,
    sortable: true,
    pageable: true,
    columns:[
    {
    field: "Title",
    title: "Title"
    },
    {
    field: "Description",
    title: "Description"
    },
    {
    field: "files",
    title: "Files",
    template: "#= files #" // Obviously this is incorrect.
    }
    ]
  });
});
</script>                                                       
                                                      
Krishna
Top achievements
Rank 1
 asked on 30 Jan 2012
7 answers
671 views
I would like to create a chart, but on my datasource connection, i'm going to use a method to get a result from the database and then convert the result into json as follows in the default.aspx.cs code behind:

    public string  LoadData()
    {
        DataClassesDataContext db=new DataClassesDataContext();
     var linq = from s in db.Edmund_Reporting_Counter()
                    select s;
     string jsonStr = JsonConvert.SerializeObject(linq);
   
    return jsonStr;
    }

The question is coming from the default.aspx on the datasource:


  theme: $(document).data("kendoSkin") || "default",
                        dataSource: {
                            transport: {
                                read: {
                                   
                                    url: "default.aspx/LoadData",           
                                    dataType: "json"
                                    
                                }

                            }
                   
On the url, what must i do so that it will i pick the result from the LoadData method in code behind.
Thanks,
Asad
Top achievements
Rank 1
 answered on 30 Jan 2012
1 answer
273 views
Hi
I have this annoying problem when trying to validate the upload file type.
I got the alert all the time.

This is the code I use:

$(document).ready(function(){
$("#contact-form").kendoValidator();
$("#files").kendoUpload({
multiple: false,
select: onSelect
});

function onSelect(e) {
// Array with information about the uploaded files
var files = e.files;


if (this.extension != ".jpg") {
            alert("Only .jpg files can be uploaded")
            e.preventDefault();
        }
}
});

Regards!
B.
Dimo
Telerik team
 answered on 30 Jan 2012
3 answers
118 views
Hey!

First of all congrats for this amazing beta, it looks awesome..

I have a problem, and is that when I compile with dreamweaver then install the .apk on Android I launch it and after 1 or 2 seconds it closes himself...

What I am doing wrong?

I'm testing with the overview example..

Thank you!
Kamen Bundev
Telerik team
 answered on 30 Jan 2012
3 answers
344 views
Hi,
I am using Tabstrip of Kendo UI and it is nice.

I am facing one difficulty, any help will be appreciated...

I have one Tabstrip with one table inside one tab of it and based on some event i want to add one more Tabstrip in html form and so on.
I am able to add new Tabstrip, but the only problem I am facing is the newly created Tabstrip is not working properly.

I am not able to change the tabs of newly created Tabstrip, also I am using Datepicker of Kendo UI which is there in the table, that too is not working for newly created Tabstrip.

I also found that it might be because of same name "tabstrip1" for newly created tabstrip but i dont know how to achieve my functionality...

      $(document).ready(function() {
                      $("#tabstrip1").kendoTabStrip({
                          animation:    {
                              open: {
                                  effects: "fadeIn"
                              }
                          }
                      
                      });
                  });


PFA file containing my code and functionality i want

I will be much helpful if I get some solution. and thanks in advance

Regards,
Jayesh.
Georgi Tunev
Telerik team
 answered on 30 Jan 2012
0 answers
126 views
Hi guys,

I have some websites running with old version of jQuery. So which is the minimum required version of jQuery for Kendo? I didn't find any requirements page.. :(
Nick
Top achievements
Rank 1
 asked on 30 Jan 2012
1 answer
81 views
I am trying to make one column editable ONLY when creatting new, while another column must remain editable all the time.

I tried this:

model: {
    id: "name",
    fields: {
        name: { 
            editable: {
                 create: true,
                 update: false
             },
             nullable: false
        },
        ttl: {
            editable: {
                 create: true,
                 update: true
            },
            type: "number",
            defaultValue: 7,
            validation: {
                required: true,
                min: 1
            }
        }
    }
}

Along with a destroy column and this:

editable: {
                       destroy: true,
                       confirmation: "Are you sure you want to remove the application? \n\nRemember to press Save, when finished."
                   },

Is it possible - perhaps via some hacking?
Rosen
Telerik team
 answered on 30 Jan 2012
0 answers
224 views
Hi,

we have used kendo templates to display elements as plain html into some tables.
Some of these fields in the table are clickable and we want to be able to pop up selection windows on clicking on them.

Can be seen here : 
http://98.130.153.40/botCreaterNewIdFor.html?id=4e5bb37258200ed9aabc6e61 
if you click on Publish>Align
you will see that the window popup comes at the top of the page instead of a popup.

Can you let me know if there would be an issue popping up windows from within kendo templates

Rahul
Rahul
Top achievements
Rank 1
 asked on 30 Jan 2012
1 answer
1.0K+ views
Hi,

Following example shows how to show master details data in grid.

In this example, there is single filter that shows orders for selected employee, but there is a need to add two filters with OR logic.
function detailInit(e) {
.....
              filter: { field: "EmployeeID", operator: "eq", value: e.data.EmployeeID }
                       },
                       scrollable: false,
     .....

I found this from documentation, that shows that multiple filters are supported:
// returns only data where orderId is equal to 10248 and customerName starts with Paul
filter: [ { field: "orderId", operator: "eq", value: 10248 },         
{ field: "customerName", operator: "startswith", value: "Paul" } ]


Is it possible to add more than one filter with OR operator? 



BR
Marko
Rosen
Telerik team
 answered on 30 Jan 2012
0 answers
60 views
// My code is as follows:

<input id="myControl" style="max-width: 66px;" />

$('#myControl').kendoNumericTextBox();


// The following doesn't work:
$('#myControl').hide();
$('#myControl').show();


Is this a bug? What is the proper way to hide/show a kendo control?
V N
Top achievements
Rank 1
 asked on 30 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?