Telerik Forums
Kendo UI for jQuery Forum
1 answer
73 views
This is probably more a request than a bug.

I'm using the <optgroup> tag to group the options in my select. The MultiSelect widget converts them to "undefined" items. Is the optgroup tag supposed to be supported? If not, could it be in the future?

Thanks
Georgi Krustev
Telerik team
 answered on 24 Sep 2013
1 answer
284 views
Hi,

I need to make some of the items in the combobox to act like headers, therefore I need them to be not clickable,  is this possible?

I'm planning in using templates for both the headers (no clickable) and the children elements (the clickable options)

Thank,
Ignacio
Georgi Krustev
Telerik team
 answered on 24 Sep 2013
1 answer
290 views
hello
in my complete mobile web app i got the same problem wenn redirecting to a new site with click on a button

example:
iam on site: www.host.org/home/index
and i want to: www.host.org/mail/inbox

on click the button redirects to correct site but the url is now www.host.org/home/index#/mail/inbox

its no big thing, main features are still working, but i ran into some update and refresh issues. for example: after a redirect and creating of a this kind of a monster url badges on buttons are no longer displayed. even refresh don let them appear. only tiping the correct url fixes it.
i also have problems with login and out becouse of this kind of url


example for a button :
<a data-role="button" href="/projekte/index"> <img src="~/Content/images/icons/48x48/projekte48.png" /> Projekte </a>

or my "login button"
<a data-click="login" id="modalview-login-button" type="button" data-role="button">Login</a>
<script>
//...

$.ajax({
        type: "POST",
        url: webMethod,
        data: parameters,
        contentType: "application/json; chaset=utf-8",
        dataType: "json",
        success: function (data) { if (data.Success) { app.navigate("/home/index"); closeModalView(); } }
    });

//...
</script>
Petyo
Telerik team
 answered on 24 Sep 2013
1 answer
40 views
hi all, I'm developing an app with PhoneGap and KendoUI; I'm brand new to both of these frameworks so forgive my potential ignorance.

I have a single html file with multiple data-role="view" views, within the phonegap JS I am watching for state changes, on "deviceready" i'd like to change from my default "Loading" view to my login view.

My question is: is there an elegant, KendoUI method to trigger this view change? If not, do I simply .hide() the one and .show() the other?

Thanks
Daniel
Telerik team
 answered on 24 Sep 2013
1 answer
59 views
I am using a kendo grid (2012.2.803.340). I am binding data
on read action. It always fires correctly. But on Ajax post, it does not fire.
Other than Firefox browser, it works fine.
Nikolay Rusev
Telerik team
 answered on 24 Sep 2013
14 answers
447 views
I seem to be having trouble displaying events in the calendar. I know that I am able to get the JSON results without an issue as I created a test page which simply echo's the JSON results. I must be missing something in the code I modified and likely it is very, very simple. On a side note, the scheduler page is loaded up within a tab strip item, but I don't think that makes a difference as I don't see the results when I connect to the page directly.

Help is much appreciated...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Appointment Schedular</title>
    <link href="css/Autovation.css" rel="stylesheet" />
    <link href="css/kendo.common.min.css" rel="stylesheet" />
    <link href="css/kendo.default.min.css" rel="stylesheet" />
    <script src="js/jquery.min.js"></script>
    <script src="js/kendo.all.min.js"></script>
</head>
 
<script id="editor" type="text/x-kendo-template">
   <h3>Edit meeting</h3>
   <p>
       <label>Title: <input name="title" /></label>
   </p>
   <p>
       <label>Start: <input data-role="datetimepicker" name="start" /></label>
   </p>
   <p>
       <label>Start: <input data-role="datetimepicker" name="end" /></label>
   </p>
</script>
 
<?php
 
 
require_once 'dbModules/DataSourceResult.php';
require_once 'dbModules/SchedulerDataSourceResult.php';
require_once 'Kendo/Autoload.php';
 
 
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    header('Content-Type: application/json');
 
    $request = json_decode(file_get_contents('php://input'));
 
    $result = new SchedulerDataSourceResult('mysql:host=localhost;dbname=appdata', 'root', '...');
 
    $type = $_GET['type'];
 
    $columns = array('ID', 'EstimateID', 'CustomerID', 'Subject', 'Location', 'Description', 'StartTime', 'EndTime', 'VehicleType','IsAllDay', 'Synchronized');
 
    switch($type) {
        case 'create':
            $result = $result->create('Appointments', $columns, $request->models, 'ID');
            break;
        case 'update':
            $result = $result->update('Appointments', $columns, $request->models, 'ID');
            break;
        case 'destroy':
            $result = $result->destroy('Appointments', $request->models, 'ID');
            break;
        default:
            $result = $result->read('Appointments', array('ID'), $request);
            break;
    }
 
    echo json_encode($result, JSON_NUMERIC_CHECK);
 
    exit;
}
 
$transport = new \Kendo\Data\DataSourceTransport();
 
$create = new \Kendo\Data\DataSourceTransportCreate();
 
$create->url('scheduler.php?type=create')
       ->contentType('application/json')
       ->type('POST');
 
$read = new \Kendo\Data\DataSourceTransportRead();
 
$read->url('scheduler.php?type=read')
     ->contentType('application/json')
       ->type('POST');
 
$update = new \Kendo\Data\DataSourceTransportUpdate();
 
$update->url('scheduler.php?type=update')
       ->contentType('application/json')
       ->type('POST');
 
$destroy = new \Kendo\Data\DataSourceTransportDestroy();
 
$destroy->url('scheduler.php?type=destroy')
        ->contentType('application/json')
        ->type('POST');
 
$transport->create($create)
          ->read($read)
          ->update($update)
          ->destroy($destroy)
          ->parameterMap('function(data) {
              return kendo.stringify(data);
          }');
 
$model = new \Kendo\Data\DataSourceSchemaModel();
 
$IDField = new \Kendo\Data\DataSourceSchemaModelField('ID');
$IDField->type('number')
        ->from('ID')
        ->nullable(false);
 
$estimateID = new \Kendo\Data\DataSourceSchemaModelField('EstimateID');
$estimateID->type('number')
           ->from('EstimateID')
           ->defaultValue('No title')
           ->validation(array('required' => true));
 
$customerID = new \Kendo\Data\DataSourceSchemaModelField('CustomerID');
$customerID->type('number')
           ->from('CustomerID')
           ->defaultValue('No title')
           ->validation(array('required' => true));
 
$subjectField = new \Kendo\Data\DataSourceSchemaModelField('Subject');
$subjectField->type('string')
             ->from('Subject');
 
$locationField = new \Kendo\Data\DataSourceSchemaModelField('Location');
$locationField->type('string')
              ->from('Location');
         
$descriptionField = new \Kendo\Data\DataSourceSchemaModelField('Description');
$descriptionField->type('string')
                 ->from('Description');
 
 
$startField = new \Kendo\Data\DataSourceSchemaModelField('StartTime');
$startField->type('datetime')
           ->from('StartTime');
 
$endField = new \Kendo\Data\DataSourceSchemaModelField('EndTime');
$endField->type('datetime')
         ->from('EndTime');
 
$vehicleTypeField = new \Kendo\Data\DataSourceSchemaModelField('VehicleType');
$vehicleTypeField->type('string')
                 ->from('VehicleType');
 
$isAllDayField = new \Kendo\Data\DataSourceSchemaModelField('IsAllDay');
$isAllDayField->type('boolean')
              ->from('IsAllDay');
 
 
$SynchronizedField = new \Kendo\Data\DataSourceSchemaModelField('Synchronized');
$SynchronizedField->type('boolean')
                          ->from('Synchronized');
 
$model->id('ID');
$model->addField($IDField);
$model->addField($estimateID);
$model->addField($customerID);
$model->addField($subjectField);
$model->addField($locationField);
$model->addField($descriptionField);
$model->addField($startField);
$model->addField($endField);
$model->addField($vehicleTypeField);
$model->addField($isAllDayField);
$model->addField($SynchronizedField);
 
$schema = new \Kendo\Data\DataSourceSchema();
$schema->data('data')
        ->errors('errors')
        ->model($model);
 
$dataSource = new \Kendo\Data\DataSource();
 
$dataSource->transport($transport)
    ->schema($schema)
    ->batch(true);
 
//$editable = new \Kendo\UI\SchedulerEditable();
//$confirmation = true;
//$editable->confirmation($confirmation);
//$editable->template('$editor')//;
 
$scheduler = new \Kendo\UI\Scheduler('scheduler');
$scheduler->timezone('America/Toronto')
        ->date(new DateTime())
        ->height('850')
        ->addView(array('type' => 'day', 'startTime' => new DateTime('7:00',new DateTimeZone('America/Toronto'))),
            array('type' => 'week', 'selected' => true, 'startTime' => new DateTime('7:00',new DateTimeZone('America/Toronto'))), 'month', 'agenda')
        ->dataSource($dataSource);
 
?>
<?php
echo $scheduler->render();
?>
Pavel
Top achievements
Rank 1
 answered on 24 Sep 2013
1 answer
68 views
I have been tearing apart these blogs to find my answers since they are not yet in the (beta) documentation.  My understanding is I should be able to pass data back to my ReST call by specifying what fields I want in the "parameterMap".  I can see the transfer happening in the browser.  Unfortunately this data is not to be found when I break in my controller code where the TaskViewModel is a parameter. Oh, and the "options.model" value is null inside the parameterMap function I have.

Am I correct in assuming this transfer of values from the parameterMap to the controller happens through the TaskViewModel?  Or do I need to connect something manually?  HOW DO I GET MY VALUES TO THE CONTROLLER?  help please
Entilzha
Top achievements
Rank 2
 answered on 24 Sep 2013
2 answers
225 views
Hi 

Using MVVM techniques I have bound a dropdown list like this (this element is sitting within a Kendo UI mobile View):

    <select id="treatmentTypesSelect" name="TreatmentTypes" data-role="dropdownlist" data-bind="source: TreatmentTypes, value: TreatmentTypeId, events: { click: onTreatmentTypeChange}" data-change="onTreatmentTypeChange" data-text-field="name" data-value-field="value" required required data-required-msg="Treatment Type is required"></select>              

The function onTreatmentTypeChange is defined in the bound viewModel of the View.
                
Using the Icenium simulator the onTreatmentTypeChange event is fired and works properly, but once deployed to an android device the event is no longer raised.

I tried changing it to this:

    <select id="treatmentTypesSelect" name="TreatmentTypes" data-role="dropdownlist" data-bind="source: TreatmentTypes, value: TreatmentTypeId" data-change="onTreatmentTypeChange" data-text-field="name" data-value-field="value" required required data-required-msg="Treatment Type is required"></select>              
But this does not work either.

What is the correct way to bind events (in particular the change event)?
                
Aaron
Top achievements
Rank 2
 answered on 23 Sep 2013
1 answer
127 views
I am using the following in my dataSource:

            transport: {
                read: {
                    contentType: "application/json; charset=utf-8",
                    url: "DepartmentHome.aspx/GetMembers",
                    dataType: "json"
                },
                create: {
                    url: "DepartmentHome.aspx/CreateMember",
                    type: "POST"
                },
                update: {
                    url: "DepartmentHome.aspx/EditMember",
                    type: "POST"
                },
                destroy: {
                    url: "DepartmentHome.aspx/DeleteMember",
                    type: "POST"
                }                
            },

and in my code behind I have defined the WebMethods as such:

        [WebMethod]
        public static void CreateMember()
        {
            File.WriteAllText(@"C:\testing.txt", "This is a create.");
        }

        [WebMethod]
        public static void EditMember()
        {
            File.WriteAllText(@"C:\testing.txt", "This is an update.");
        }

        [WebMethod]
        public static void DeleteMember()
        {
            File.WriteAllText(@"C:\testing.txt", "This is a delete.");
        }

When I create, edit, or delete a record it looks as if it has done it in the grid but it never calls the associated WebMethod.
I do see in firebug that it sends:
POST CreateMember
POST EditMember
POST DeleteMember

When I click on the associated buttons the POST data contains the parameters for that row:
FirstName: John
Id: 1
LastName: Smith

The Response back from the POST is just all the html from the page DepartmentHome.aspx.

I am using a WebMethod for read and that is working perfectly.  I don't know what the difference would be?

I have attached the complete source code.

Any help would be greatly appreciated.






Rosen
Telerik team
 answered on 23 Sep 2013
1 answer
79 views
Hi,
How do you define a stockchart series who's time interval is x minutes? as opposed to daily?

Any examples of a live / simulated live updated stockchart with volume? thanks!


 
Alexander Popov
Telerik team
 answered on 23 Sep 2013
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?