Telerik Forums
Kendo UI for jQuery Forum
3 answers
274 views
Are other people noticing this:

I have a Grid with         selectable:"multiple, row", and pageable set to true. When there are multiple pages, the selections that I made on page 1, will disapear (no longer be highlighted in blue) when I switch to page 2, and then back to page 1.

However, this is only a visual bug. calling .clearSelections()  or .select() with no parameters will still find all the ones that are selected.

In addition. Let's say that I have 300 rows, at 30 items per row. If do a:

grid.select(grid.tbody.find(">tr[data-uid]"));
console.debug("Selected all " + grid.select().length);

then I see that 300 items were selected. But visually on the items on the page that is displaying will get the blue highlight. None of the other pages visually show that they are selected.

Rosen
Telerik team
 answered on 05 Jul 2012
3 answers
431 views

Hi,

Just sampling your UI and it seems to be just what I am after. I have tried as the first project to use a combo box. Firstly I got the box working using your example on my site, now I am trying to bind a JSON data source to it.

the box initializes OK, but the values are filled with "undefined".

The code used to start the box is as follows:

<script type="text/javascript">
$(document).ready(function() {
    $("#titles").kendoComboBox({
        index: 0,
        dataTextField: "name",
        dataValueField: "value",
        filter: "q",
        dataSource: {
            type: "json",
            serverFiltering: true,
            serverPaging: true,
            pageSize: 20,
            transport: {
                read: "http://www.xxxxxxxxxx.net/kendo_getjson5.php"
            }
        }
    });
});
        
</script>

The data being returned by the script is as below. i am not sure what the top level element in the JSON should be>? I set it to dataSource? Maybe this is the problem?
Also my script accepts a query string with q= , so the filter should be set to q?

Also its not reading cross domain, its all on the same domain, so json is the correct type?

{"dataSource":[ {"value":"1366","name":"TAD1341GE "},{"value":"1367","name":"TAD1342GE "},{"value":"1368","name":"TAD1343GE "},{"value":"1369","name":"TAD1344GE "},{"value":"1370","name":"TAD1345GE "},{"value":"943","name":"TAD1640GE "},{"value":"944","name":"TAD1641GE "},{"value":"945","name":"TAD1642GE "},{"value":"1254","name":"TAD531GE "},{"value":"1255","name":"TAD532GE "}]}


Regards and TIA

Charlie

I have checked my datasournce with JSONLint to make sure its valid.

James Shelton Agar
Top achievements
Rank 2
 answered on 04 Jul 2012
4 answers
169 views
Hi,

I am trying to add a new row to a grid using the inline editor. One of the columns is a drop down list. I think it is setup properly. When the drop down list control loses focus, the cell reverts from the text value to the option value. How do you structure the drop down list to keep the text and not replace the cell with the value?

function vendorDropDownEditor(container, options) {
  $('<input data-text-field="name" data-value-field="id" data-bind="value:' + options.field + '"/>')
    .appendTo(container)
    .kendoDropDownList({
      dataTextField: "name",
      dataValueField: "id",
      autoBind: false,
      dataSource: [{"id":1,"name":"aaa"},{"id":2,"name":"bbb"},{"id":3,"name":"ccc"},{"id":4,"name":"ddd"},{"id":5,"name":"eee"},{"id":6,"name":"fff"}]
  });
}

Any tips on why the drop down leaves the value behind and not the text much appreciated. 


Jose
Top achievements
Rank 1
 answered on 04 Jul 2012
2 answers
526 views
I have used the following trick (which I saw in this forum) to create Kendo windows that have no <div id='xxxx'> in the HTML source. But it is not working for ListViews:

$("<div id='ColumnNamesTMP' />").kendoListView({
     dataSource: dataSource,
     pageable: false,
     dataBound: function(e) {
         var html = $("#ColumnNamesTMP").html();
         GridData.columnChooser.content(html);
     },
     template:kendo.template(template)
 });
The dataBound function is never being called.

However, if I add  <div id="ColumnNames" style="visibility: hidden;"/> to the source HTML file, then the dataBound function is called and GridData.columnChooser (which is a kendoWindow) has it's contents filled in. But as you see I have to go and use jQuery to rip out the <DIV> from the DOM:

$("#ColumnNames").kendoListView({
    dataSource: dataSource,
    pageable: false,
    dataBound: function(e) {
        var html = $("#ColumnNames").html();
        $("#ColumnNames").remove();
        GridData.columnChooser.content(html);
    },
    template:kendo.template(template)
});

I can use http://handlebarsjs.com to do this sort of template generation of HTML, but I am looking for a KENDO only solution if possible.

If you are wondering why I want to completely dynamically created kendoList, the answer is that the the list is going to be placed in a kendoWindow that is also created on the fly and added to the DOM:

$("<div id='colChooser'/>").kendoWindow({
    actions:["Maximize", "Minimize", "Close"],
    width:"14em",
    height:"25em",
    title:"Choose Columns",
    modal:true
});
GridData.columnChooser = $("#colChooser").data("kendoWindow");

the content will be filled in later with:
GridData.columnChooser.content(html);







Dr.YSG
Top achievements
Rank 2
 answered on 04 Jul 2012
3 answers
738 views
Setting step for a NumericTextBox seems to only affect the behaviour of the spinners.
"Manual" user input is not validated, so the user can enter numerals that aren't multiples of the step value.
Neither does using a Kendo Validator work.

See this fiddle:

http://jsfiddle.net/Ns6sd/2/ 
Alexander Valchev
Telerik team
 answered on 04 Jul 2012
0 answers
52 views

In the kendo.grid.js I can see a line:

html += kendo.attr("title") + '="' + th.title.replace(/'/g, "\'") + '" '

Please look at replace part. It replaces apos with apos.
I think your intention was to handle quot.

Thanks.

 

 

Vladimir
Top achievements
Rank 1
 asked on 04 Jul 2012
5 answers
250 views
Hi,

I am having a table with three columns Id,name and Bit
I want to display the names of the tabstrip from the name column which contains some names
and the i want to display the content also based on the bit filed the bit filed is a boolean value
i.e either true or false.If the bit filed is 0 i want to display some content and if the bit field is 1 i want
to display another content.And i am trying to do this entire process dynamically.

Is it possible using kendoUI,please provide me sample or examples

Thanks
Alexander Valchev
Telerik team
 answered on 04 Jul 2012
2 answers
198 views
 I have problem with de popup editable i have the next code is equals that example to kendo,but does not work:

<div id="example" class="k-content">
      <div id="grid">
      </div>
      <script type="text/javascript">
            $(document).ready(function () {
                  var crudServiceBaseUrl = "http://demos.kendoui.com/service",
                        dataSource = new kendo.data.DataSource({
                              transport: {
                                    read: {
                                          url: crudServiceBaseUrl + "/Products",
                                          dataType: "jsonp"
                                    },
                                    update: {
                                          url: crudServiceBaseUrl + "/Products/Update",
                                          dataType: "jsonp"
                                    },
                                    destroy: {
                                          url: crudServiceBaseUrl + "/Products/Destroy",
                                          dataType: "jsonp"
                                    },
                                    create: {
                                          url: crudServiceBaseUrl + "/Products/Create",
                                          dataType: "jsonp"
                                    },
                                    parameterMap: function (options, operation) {
                                          debugger;
                                          if (operation !== "read" && options.models) {
                                                return { models: kendo.stringify(options.models) };
                                          }
                                    }
                              },
                              batch: true,
                              pageSize: 30,
                              schema: {
                                    model: {
                                          id: "ProductID",
                                          fields: {
                                                ProductID: { editable: false, nullable: true },
                                                ProductName: { validation: { required: true} },
                                                UnitPrice: { type: "number", validation: { required: true, min: 1} },
                                                Discontinued: { type: "boolean" },
                                                UnitsInStock: { type: "number", validation: { min: 0, required: true} }
                                          }
                                    }
                              }
                        });


                  $("#grid").kendoGrid({
                        dataSource: dataSource,
                        pageable: true,
                        height: 400,
                        toolbar: ["create"],
                        columns: [
                            { field: "ProductName", title: "Product Name" },
                            { field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: "150px" },
                            { field: "UnitsInStock", title: "Units In Stock", width: "150px" },
                            { field: "Discontinued", width: "100px" },
                            { command: ["edit", "destroy"], title: "&nbsp;", width: "210px"}],
                        editable: "popup"
                  });
            });
      </script>
</div>
look at the  image , the file attached, the popup does not work, 

Trevor
Top achievements
Rank 1
 answered on 04 Jul 2012
1 answer
156 views
Hi,

I don't know if this is the right forum for this question.

I am brand-new to Kendo.  I have not even started using it.  Just studying it to understand its advantages.  I have a WCF Data Service server application.  On the server side, I have two .NET C# projects in my solution; one WCF Service application where I have defined the entity model and the RESTful Data Service classes.  I can use the browser to query my model and everything seems to be OK.  I also have a Client asp.net application (which I intend to port to HTML5 with the help of Keno UI).  Right now, my concern is how would I handle the model updates from the Kendo app.  I have seen some example code out there on the internet to "query" cross domain using jQuery and JASONP and I have also seen a blog post on Kendo doing the same thing using Kendo's own API.  But I have not seen any sample about how to do this for model updates such as 'PUT', 'POST' etc.

Can somebody point me to some sample code to acoomplish this please.  I really appreciate it.

Babu.
Alexander Valchev
Telerik team
 answered on 04 Jul 2012
1 answer
179 views
Hello,
I am pretty new to kendo ui and i am trying to get a simple example to work. I have created a REST based web service using asp.net web api which returns IQueryable<> ( so supposedly it supports odata). I can verify that it returns data using a browser.

I have another page in the same application that has a kendo grid in which i am trying to display data returned from the service, the code is 

<div id="body">
    <div id="grid"/>
        @Scripts.Render("~/bundles/jquery")
        <script src="../Scripts/Kendo/kendo.all.min.js" type="text/javascript"></script>
         <script src="../Scripts/Kendo/kendo.web.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function () {
                $("#grid").kendoGrid(
        {
            dataSource:
            {
                type: "odata",
                transport:
                {
                    read: "http://localhost/MSDNWebApi/Api/Movie"
                }
            }
        })
            });  
        </script>
 </div>   
I can confirm using chrome's development tools that the there are no errors and all the requests from the server are working. I can also confirm that the service is returning json data when the kendo ui makes the call, however the ui does not display any data..

I read somewhere that it needs a jsonp format, but i am hoping that its only needed for cross domain conversation.
any help will be appreciated.
Attached the output from the service....
thanks



Alexander Valchev
Telerik team
 answered on 04 Jul 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?