Telerik Forums
Kendo UI for jQuery Forum
1 answer
185 views

Hi All,

We're experiencing a problem with the DatePicker control that ships with Kendo when using jQuery validation that ships with ASP.NET MVC. This is my best attempt at describing the problem:

When using jquery.validation that ships with MVC, and you call $(‘form’).valid() it marks the outer span of the datepicker (the one with the k-datepicker class on it) with the error class. Then, when you validate the form again (i.e: change another field, or click save), the jquery.validation goes and removes any element with the .error class (not sure why, just the way it works). Because this class was put onto the datepicker itself, calling .hide() actually removes the datepicker from view.

Any ideas on how to solve this?

Paul
Top achievements
Rank 1
 answered on 25 Apr 2012
0 answers
83 views
I have moved this original thread to the MVVM area: http://www.kendoui.com/forums/framework/mvvm/unable-to-delete-numeric-or-date-value-and-have-model-update.aspx#2084418.

After more investigation, the controls (DatePicker and NumericTextBox) appear to be doing their part. Both control types do indeed have their values set to NULL and appear to be triggering the change event. It would seem the datasource is ignoring the change event if the value is NULL for numerics and dates.

Mike
Michael
Top achievements
Rank 1
 asked on 25 Apr 2012
1 answer
208 views
I have a Grid with a date column. In the datasource's model, it is defined with type='date'.
First problem: the first time the grid is displayed, the date is well displayed. If I edit another column, after saving changes, the date is displayed in json format. If I click "refresh" the date is well displayed again.
Second problem: I can't save the date modifications, it seems the grid doesn't send the value of the grid column.

I've made a screencast that shows that: http://screencast.com/t/jYj97QV1
Daniel
Top achievements
Rank 1
 answered on 25 Apr 2012
1 answer
170 views
Is there a possibility to aggregate the grid schema dat aon the fly with ajax? I tested ist with a function but it didn't work.
i.e.:
It seems not to work cause if the data format, i guess ... any idea?

in the grid object:
schema: getSchema()


the function:
function getSchema()
{
var dataReturn;
    $.ajax({
        url: "/ajax/listen/getschema",
        success: function(data){
            console.log(data);
            dataReturn = eval( "("+ data +")");
        },
        error: function(data){
            console.log(data.responseText);
        },
        complete: function(jqXHR, textStatus){
            console.log(jqXHR);
            console.log(textStatus);
        }
    });
    return dataReturn;
}
GungFooMon
Top achievements
Rank 1
 answered on 25 Apr 2012
10 answers
496 views
Hi Guys,

I am writing simple application in kendoui to get json object through web service and printing it in grid. But nothing is printing except header values.

json object is:
{ "results" : [{ "name" : "Arkadiusz Pikura1", "desc" : "Pracownik 1 KS-Solab" }, { "name" : "Marcin Wita", "desc" : "Pracownik 2 KS-Solab" }] }


I am attaching code for the same. 

<!DOCTYPE html>


    <head>
        <title>JSON Example</title>
<link href="styles/kendo.common.min.css" rel="stylesheet" type="text/css" />
    <link href="styles/kendo.default.min.css" rel="stylesheet" type="text/css" />
<link href="styles/kendo.common.css" rel="stylesheet" type="text/css" />
    <link href="styles/kendo.default.css" rel="stylesheet" type="text/css" />


    <!--Then paste the following for Kendo UI Web scripts-->
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="js/kendo.web.min.js" type="text/javascript"></script>
<script src="js/kendo.mobile.min.js" type="text/javascript"></script>
    <!--In the header of your page, paste the following for Kendo UI Mobile styles-->
    <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
        
    </head>
    <body>
        <div class="main">
            <div class="header">
                
                <h1>Kendo UI Grid</h1>
            </div>
             
             <div id="grid1">
                <table id="grid2">
                    <tr>
                        <th data-field="name">Name</th>
                        <th data-field="desc">Description</th>
                    </tr>
                </table>
            </div>       
        </div>
    </body>


<script>
$(document).ready(function() {
 
   $("#grid2").kendoGrid({
      dataSource: {
         transport: {
            read: {
               url: "http://dhpl.comuf.com/json.php",
               dataType: "json"
            }
         },
         schema: {
data:"results",
            model: {
               fields: {
                  desc: {},
                  name: {}
               }
          }
      }
   },
   
     columns: [
      {
         field: "desc",
         title: "results"
      },
      {
         field: "name",
         title: "results"
      }
      ]
   });
});
</script>
</html>

Please help me to figure our the problem. 
Alexander Valchev
Telerik team
 answered on 25 Apr 2012
2 answers
147 views
Hi,
My save handler generates JSON correctly (PHP code used to generate the JSON below). but I still get an upload error. The actual file is uploaded successfully.
$var_OutputArray = array('attachid'=>$attachment->AttachmentID, 'mod'=>$attachment->ModuleCode,'tic'=>$attachment->Type);
header('Content-type: text/plain');
echo json_encode($var_OutputArray);

An example of JSON output which generates the error is
{"attachid":"labgh3v1din96yfk","mod":"prj","tic":"ticket"}

Vivek
Top achievements
Rank 1
 answered on 25 Apr 2012
1 answer
185 views

If using the upload control as a drop-in replacement for the default file upload control (not using async), is it possible to handle multiple files on the server-side?

I don't see how it is possible since when you get back to the server-side, there is only one fileUpload control on the page. Thus one file.

Is there some trick I am missing?  Or do I need to turn off multiple files, unless using async?

Vivek
Top achievements
Rank 1
 answered on 25 Apr 2012
0 answers
99 views
Hi Guys,

I have a grid page, In this page i need Drag and drop item from listItem to Grid...

Please Help Me...

Thanks
Loganathan
Top achievements
Rank 1
 asked on 25 Apr 2012
3 answers
205 views
Hi All,

I have a product listing grid and I need to be able to drag each product onto another panel on the same page.

One of the posts suggested that the Grid has no built-in drag and drop support yet.  So I attempted to use the non-visual Drag and Drop component, as follow:

1. Using Table method with each TD:
<td><div class="pc-draggable" style="display: inline-block; width:100%; cursor:pointer">Each product name goes here</div></td>

2. Using jQuery.each to convert each of the div within each td into draggable.
$(".pc-draggable").each(function () {
          {
                  var dragHint = $(this).clone();
                  $(this).kendoDraggable({ hint: function () { return dragHint; } });
         }
}

This seems to allow dragging UNTIL the user change the listing via pagination.  It seems pagination "ditches" my custom drag bindings in step 2.

Is there any way I can work arround this issue of losing the custom draggable binding?   One way I could think of is to catch the "pagination change event", but I don't know (if it is possible) how to hookup/bind such an event, so that I could re-execute the code in step 2 above.   The only way I could catch the pagination click was using the following code:
 $(".k-link").click(function () { setTimeout("prepareDraggable()""300");});  
// Where prepareDraggable() is actually step 2 above.


Or, if any one can suggest a better or proper way to implement per-grid row drag and drop?

Thanks!

JB





Loganathan
Top achievements
Rank 1
 answered on 25 Apr 2012
4 answers
628 views
When creating a treeview from hierarchical html, is there an attribute I can include on a <li> element to make it the selected node
Richard
Top achievements
Rank 1
 answered on 25 Apr 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?