Telerik Forums
Kendo UI for jQuery Forum
1 answer
573 views
Hi,

I'm looking to conditionally render HTML-encoded values or literal values depending on a javascript property, such as the following:

<script id="template-cell" type="text/x-kendo-tmpl">
<td><div class="key-content"># if (data.encode === true) { # #= data.key # # } else { # #: data.key # # }#</div></td>
</script>

But all the hash marks reduce readability and are error-prone. What is a better way to handle this?

Thank you.
Petyo
Telerik team
 answered on 20 Jan 2014
5 answers
371 views
Using Kendo UI Mobile v2013.1.319 and PhoneGap 2.6.0 (iOs), I'm no longer able to open links in the Safari browser.

This worked well on previous versions:
<a href="http://apache.org" data-rel="external" target="_blank">

But now it still opens in the same webview as the app itself. 

Any tips how to force the links to open externally? Preferably without using javascript.  
Petyo
Telerik team
 answered on 20 Jan 2014
4 answers
341 views
Here i am attaching the code and php file .........i can read the data from the data base .but  cant update and delete...
after deletion value still in the database.. please help me..

<html>
<head>
<title>GRID PHP</title>
<link rel="stylesheet" href="CSS/kendo.common.min.css" />
<link rel="stylesheet" href="CSS/kendo.blueopal.min.css" />
<script type="text/javascript" src="JS/jquery.min.js"></script>
<script type="text/javascript" src="JS/kendo.all.min.js"></script>
<script type="text/javascript">
$(function() {
   $("#grid").kendoGrid({
                        dataSource: {
                            transport: {
                                read:{
url: "data/Fetch.php",
                dataType : "json",
//type: "GET"
},
update: {
                url: "data/Update.php",
                type: "POST"
            },
destroy: {
                url: "data/Delete.php",
                type: "DEETE"
            },
create: {
                url: "data/product.php",
                type: "PUT"
            },
error: function(e)
{
            alert(e.responseText);
        },

                                           
                            },
                                       //batch: true,
                            schema: {
data: "data",
                                model: {
                                                 id: "pid",
                                    fields: {
                                        pid: { editable: false },
                                        name: { type: "string",validation: { required: true}},
                                        price: { type: "number",validation: { required: true} },
description: {type: "string"},
                                    }
                                }
                            },
                            pageSize: 10
                        },
                         editable:  "popup",
                        height: 400,
selectable : "row",
                        //filterable: true,
                        //sortable: true,
                        pageable: true,
                        toolbar: ["create","save"],
                        columns: [
{
                                field:"pid",
                                title: "PID",
width:"50"
                                //filterable: true
                            },
{
field: "name",
title: "Name",
attributes: {style: "text-align: center; font-size: 14px;"},
},
{
field: "price",
title: "Price",
width:250
},

title: "Description",
field: "description" 
},
                                      
{ command: [{text:"Edit", name:"edit"}, 
{text:"Delete",name: "destroy"}], title: " ",width:200 }
                        ]
                    });
function detailInit(e) {
// get a reference to the current row being initialized
//var detailRow = e.detailRow;

// create the datasource
}
}); 

</script>
</head>
<body>
<div id="grid"></div>
</body>
</html>    
Petur Subev
Telerik team
 answered on 20 Jan 2014
2 answers
275 views
Hi!

I'd like to open the event-editor popup automatically when a timerange has been selected (without pressing ENTER). How do I trigger opening the window? 

Here is the change listener I've implemented so far:


var changeTimer;
    var changeInterval = 1000;
    var selectedStart;
    var selectedEnd;
    function scheduler_change(e) {
        if (e.events.length == 0 && e.start < e.end) {
            selectedStart = e.start;
            selectedEnd = e.end;
            if (changeTimer) {
                clearTimeout(changeTimer);
            }
            changeTimer = setTimeout(openWindow, changeInterval);
        }
   }

 function openWindow() {
        if (selectedStart && selectedEnd) {
            var scheduler = $("#scheduler").data("kendoScheduler");
            //open editor here
        }
    }

My Scheduler:

@(Html.Kendo().Scheduler<SchedulerEvent>()
          .Name("scheduler")
          .Date(DateTime.Today)
          .Editable(edit => edit.TemplateName("SchedulerEventEditor"))
          .EventTemplateId("template")
          .DateHeaderTemplate(string.Format("<strong>#=kendo.toString(date, '{0}')#</strong>", GlobalResources.SchedulerHeaderDateFormat))
          .Resources(resource => resource.Add(m => m.CalendarId)
                                         .Title(GlobalResources.CalendarOwner)
                                         .DataTextField("OwnerName")
                                         .DataValueField("CalendarId")
                                         .DataColorField("Color")
                                         .BindTo(Model.Calendars.Where(x => !x.IsReadOnly))
          )

          .Views(views =>
              {
                  views.DayView();
                  views.WeekView();
                  views.MonthView();
                  views.AgendaView();
              })
          .Selectable(true)
          .Events(evts =>
              {
                  evts.Change("scheduler_change");
                  evts.Edit("scheduler_edit");
                  evts.DataBound("scheduler_dataBound");
                  evts.ResizeEnd("scheduler_resize");
                  evts.MoveEnd("scheduler_move");
                  evts.Remove("scheduler_remove");
                  evts.Add("scheduler_add");
              })
          .DataSource(dataSource => dataSource
              .ServerOperation(true)
                                        .Model(
                                            m =>
                                            {
                                                m.Id(f => f.ID);
                                                //m.RecurrenceId(f => f.RecurrenceID.Value);
                                                m.Field(f => f.ConfirmationRequired).DefaultValue(true);
                                                m.Field(f => f.PointOfInterest).DefaultValue(new PointOfInterest());
                                                m.Field(f => f.Attendees).DefaultValue(new List<Guid>());
                                                m.Field(f => f.CalendarId).DefaultValue(Model.Calendars.Where(x=>x.IsOwner).Select(x => x.CalendarId).FirstOrDefault());
                                            }
                                        )
                                        
                                        .Events(e => e.Sync("function() {this.read();}"))
                                        .Read( read=>read.Action("ReadEvents", "Scheduler").Data("readData"))
                                        .Create("CreateEvent", "Scheduler")
                                        .Destroy("DeleteEvent", "Scheduler")
                                        .Update("UpdateEvent", "Scheduler")            
          )
          )

Best regards
Oliver
Top achievements
Rank 1
 answered on 19 Jan 2014
2 answers
1.1K+ views
Hi Kendo,

I'm trying to make filtering for one 'term' case insensitive.   The code below works if the 'tolower' is removed.  What I'm trying to do is pass on through the odata to the database the idea that it needs to take the database column and apply a 'lower case' to it and then do the substring operation, making the filter case insensitive.  Is there any way to get the 'tolower' on the field to work with filtering?  Thanks for your help.

Bill

parameterMap: function (data, type) {
     if (type == "read") {
          var grid = $("#grid").data("kendoGrid");
          var currentFilter = grid.dataSource.filter();
          if (currentFilter) {
                if (currentFilter.filters[1] === undefined & currentFilter.filters[0].field !== "Field1" &             currentFilter.filters[0].field !== "Field2" & currentFilter.filters[0].field !== "Field3") {
                    data.filter.logic = "or";
                    var stringValue = "";
                    stringValue = currentFilter.filters[0].value.toString();
                    var new_filter = { field: tolower(currentFilter.filters[0].field), operator: currentFilter.filters                [0].operator, value: stringValue.toLowerCase() };
                    data.filter.filters.push(new_filter);
                    new_filter = { field: currentFilter.filters[0].field, operator: currentFilter.filters[0].operator, value:          stringValue.toUpperCase() };
                    data.filter.filters.push(new_filter);
}
}

var newMap = kendo.data.transports.odata.parameterMap(data);
delete newMap.$format; // not currently supported by webapi.
return newMap;
}
}
Bill
Top achievements
Rank 1
 answered on 17 Jan 2014
3 answers
220 views
well i guess the title says it all
right now the default is orange - id like to change each stock column to a diff color

i tried putting it in the data, (ie in this case wData)
but that didnt work
pls help
thanks!

$J($chartD).kendoStockChart({
    dataSource: wData,
    series: [{
        type: "candlestick",
        openField: "open",
        closeField: "close",
        highField: "high",
        lowField: "low",
        categoryField: "cat",
 
        notes:{
            line: {
                width: 0,
                length: 0
            },
            label: {
                font: "bold 9px Open Sans, sans-serif"
            },
            icon: {
                border: {
                    width: 0
                }
            }
        },
 
        tooltip:{
            format: "{4}:<br /> {0:n0} -- {3:n0}"
        }
    }],
    navigator:{
        visible: false
    },
    categoryAxis:{
        categories: cats,
        type: "category",
        labels: {
            font: "bold 9px Open Sans, sans-serif",
            rotation: 90,
            step: 1,
            skip: 0
        }
    },
    valueAxis: {
        labels: {
            format: "N0"
        }
    }
});

Iliana Dyankova
Telerik team
 answered on 17 Jan 2014
1 answer
56 views
Hi,
I'm having some layout issues on a rapid prototype I've created.  Hit f5 a few times and it renders the scheduler differently each time.  Works fine in Firefox breaks in Chrome both on a PC.

See here 

http://gem.azurewebsites.net/

Thanks

Alec
Dimo
Telerik team
 answered on 17 Jan 2014
1 answer
178 views
I have a simple grid where only a Boolean field needs to be change. The Boolean allows for nulls. When I edit the row, I have to select the value twice before it holds the value, then save. The selected value saves fine. Its just having to select it twice to get it to stick. Has anyone seen this behavior before?
Vladimir Iliev
Telerik team
 answered on 17 Jan 2014
3 answers
52 views
Hello
After recent firefox / windows 8.1 update i'm seeing strange shaking when using flip effect. I can see the same behaviour on you web site and flip demo. It shakes during flip.
I'm using windows 8.1 and firefox 26.

Regards
Marcin
Kiril Nikolov
Telerik team
 answered on 17 Jan 2014
5 answers
1.0K+ views
Hey guys,

I'm using Kendo with MVC 3 and Html Helpers.

I need to receive possible large currency values, up to 19 digits and 2 decimal places, always positive. I have used the Min and Max methods, but I am observing a very peculiar behavior. 

For reproducing purposes the values I'm using are:
   Min()  - 0
   Max() -  9999999999999999999.99

Behaviors:

I write 17 digits 1's ( 11.111.111.111.111.111 ), after losing focus, the NumericTextBox shows me a random 2 instead of 1 at the end (  11.111.111.111.111.112 ).
After that, it seems like any digit I input is being transformed and presented incorrectly. Some times the number presented, and the number that actually exists in the NumericTextBox are different (on edit mode, and view mode). The decimal place values are also transformed incorrectly after 

At one point the value becomes ( 10.000.000.000.000.000.000 ), that is 20 digits with no decimal places. And I can't go above that, nor can I add any decimal place values to it.

There seems to be a lot of issues with the NumericTextBox control to numbers with more than 15 digits. Is this a known bug? Am I doing something wrong. Any help would be extremely helpful.

Thank you.




Georgi Krustev
Telerik team
 answered on 17 Jan 2014
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?