Telerik Forums
Kendo UI for jQuery Forum
1 answer
670 views
I have a view that has a navigation button to another view that looks like this:
<a id="GoIssue" data-role="button" href="Main/Issue?priorPage=Picklist&fieldName=reqOrWO&value={TBS}" data-icon="details" ></a><br>

I'd like to disable it under certain conditions.   I have tried adding a class to it and checking the class in the click handler:
//  Start disabled until someone puts something IN the reqOrWO field
$('#GoIssue').addClass("disabled");
 
//  disabled is implemented by returning false on the click action if it has the disabled class
//  the disabled class also has visual aspects as well.
$('#GoIssue').click(function ()
    {
        event.preventDefault ? event.preventDefault() : event.returnValue = false;
        return (!$(this).hasClass('disabled'));
    });
At first, I just tried returning false, but navigation still occurred.  So, I tried adding the additional code to call preventDefault() [if present] and event.returnValue [if not].  But none of this seems to prevent the navigation from going to the target page.

Am I missing something?  Is there a simpler way?

Thanks

Kiril Nikolov
Telerik team
 answered on 23 Oct 2013
3 answers
329 views
I have been trying to change the overlay property for a pie chart series.  According to your documenation at http://www.kendoui.com/documentation/dataviz/chart/configuration.aspx and http://demos.kendoui.com/dataviz/pie-chart/index.html, I should able to set the overlay property of the pie series to the string "glass" as so:
series: [{
type: "pie",
field: "Amount",
categoryField: "DisplayName",
colorField: "color",
padding: 20,
overlay: "glass"
}]

However, this has no effect on the chart.  After digging through the source code for the chart, I believe that overlay is not a string, but an object.  So instead of the above, I should use this:
series: [{
    type: "pie",
    field: "Amount",
    categoryField: "DisplayName",
    colorField: "color",
    padding: 20,
    overlay: {
        gradient: "glass"
    }
}]

I think this is an error in your documentation that needs correcting.

Additionally, it would be great to know all of the possible values that can be supplied there.  After further inspection of your source code, it appears that "none", "glass", "roundedBevel" are valid values that can be used.  Are there others?

Thanks,
Sara
T. Tsonev
Telerik team
 answered on 23 Oct 2013
10 answers
984 views
Hi,

Does Kendo UI will have a full calendar? Like:

http://arshaw.com/fullcalendar/

Greetings.
Atanas Korchev
Telerik team
 answered on 23 Oct 2013
3 answers
762 views
I have tried several things with no success. The most I can is the helper to be called BUT instead of the value being passed it passes #: Style # as string instead of its value

without calling the helper i can display all values

My question is: how do I call a helper that has parameters inside a ClientTemplate?


Helper (MyHelpers.cshtml on app_code folder)

@helper ProductDisplay(string Style, string DefaultColor, string Name)
{
    <div class="prodName" data-id="@(Style + "-" + DefaultColor)">@Name</div>
    string img = "http://url/image/" + Style + DefaultColor + "_1?$ereredq$&bregc=0,0,0,0";
    <text><img src="@img" /></text>
}


Grid
============================================        
@(Html.Kendo().Grid<TestProject.Models.ProductModel.ProductInformation>()
        .Name("webGrid").AutoBind(true).Scrollable(scr=>scr.Height(430))
        .DataSource(dataSource => dataSource 
            .Ajax()
            .Read(read => read.Action("GetProducts", "Home")
           )
            .ServerOperation(false)
        )
        .Columns(columns =>
        {
            columns.Template(@<text></text>).ClientTemplate(@MyHelpers.ProductDetail("#: Style #, #: DefaultColor #, #: Name #").ToHtmlString());
        })
              .Pageable()
              .Scrollable()
   )
Nikolay Rusev
Telerik team
 answered on 23 Oct 2013
5 answers
272 views
I currently use Knockout, but am trying out Kendo to see how the two compare. With Knockout there are a couple of potential view model creation patterns, one is to use a literal:

var viewModel = {
    firstname: ko.observable("Bob")
};

ko.applyBindings(viewModel );

and the other is to use a function:

var viewModel = function() {
    this.firstname= ko.observable("Bob");
};

My preference has always been to use a function because it essentially gives you a 'factory' allowing you to create multiple instances of the same view model.With KendoUI, all the examples I have seen use a literal syntax:

var viewModel = kendo.observable({
    firstname: "Bob"
});

kendo.bind(document.body, viewModel);

My question is, with Kendo is it possible to emulate the Knockout style of view model creation via functions? This would allow me to create multiple instances of the same view model, add 'private' functions, etc ...
Alexander Popov
Telerik team
 answered on 23 Oct 2013
3 answers
1.9K+ views
I've been able to accomplish such grouping in certain charts and not others.
For example, assume that I have a datasource that looks something like this:

var pictures = [
{ type: "JPG", len: 20, wid: 15, appr: 17.5, count: 2 },
{ type: "JPG", len: 22, wid: 17, appr: 12.5, count: 3 },
{ type: "JPG", len: 24, wid: 15, appr: 10.5, count: 1 },
{ type: "JPG", len: 22, wid: 4, appr: 17.5, count: 6 },
{ type: "PNG", len: 20, wid: 15, appr: 17.5, count: 4 },
{ type: "PNG", len: 25, wid: 7, appr: 9.5, count: 4 },
{ type: "PNG", len: 21, wid: 11, appr: 21.5, count: 1 }
];


I want to group by my category which in this case is "type", I want to sum all other fields.

I am able to do this quite simply with column charts, simply by setting:

series: [{aggregate: "sum",categoryField: "type"}]

However, this does not work with bullet or pie charts, so in search
of a more universal method. I "massage" the data first by adding this
at the beginning:

var dataSource = new kendo.data.DataSource({
data: pictures,
group: {
field: "type",
aggregates: [
{ field: "len", aggregate: "sum" },
{ field: "wid", aggregate: "sum" }
]
}
});
 
dataSource.read();


I don't know why just grouping the datasource isn't enough.. I
have to throw it into arrays and assign each array to a series like so:

var seriesA = [],
seriesB = [],
categories = [],
items = dataSource.view(),
length = items.length,
item;
 
for (var i = 0; i < length; i++) {
item = items[i];
 
seriesA.push(item.aggregates.wid.sum);
seriesB.push(item.aggregates.len.sum);
}

This works as long as having only one valueField per series works.
In the case of a bullet chart, or if I want to assign a field to a
plotband to a bar/column chart: it does not.

I believe I must be doing something completely wrong, as converting
my ungrouped JSON object to a grouped kendo datasource should be enough.
Below is my JSFiddle..

http://jsfiddle.net/DxMb8/4/

Any help would be greatly appreciated! thanks!

Stephen
Top achievements
Rank 1
 answered on 23 Oct 2013
2 answers
123 views


Hi there,

I am working on a mobile application to be deployed with cordova and am very excited about the Kendo Mobile UI. I have been playing with it for a couple of days and have this burning issue: When I try to load external view from local file on my machine everything runs smoothly but I was thinking of loading URLs remotely from the web site and keep the main kendo UI within the mobile application. So I figured I would just load the appropriate on the local application from the remote domain. But when I try to load a view with the full domain path like that:
<a data-role="button" href="http://www.comain.com/mobile_url.html" style="background-color: green">Go to</a>
The browser freezes and the view is not loaded. Does that mean that I can only include local files? If yes, maybe I can load external content with Ajaxor somethng of the sort? Or maybe there is a better approach I am missing?

And a second question - is there a way to tell kendo if a regular <a href... anchor should point to a view, or to a standard html page?

Thanks!
Dil
Top achievements
Rank 1
 answered on 22 Oct 2013
2 answers
427 views
I would like to create a button that when clicked, programmatically shows a column that is previously hidden, and then groups by a specific column...  Psudo code might be...

1.) Button Click
2.) Show Column called "City"
3.) Group by "State".

Any pointers on how to do this?

Jason
Jason
Top achievements
Rank 1
 answered on 22 Oct 2013
1 answer
2.2K+ views
I would like to create a button that woudl allow the user to reset this grid.  Meaning that after they apply some sorting, grouping, paging etc... they can click on this button and it would return the grid to the state it was at when the page loaded... Similar to reloading the entire page, but just reloading the grid.

Thanks,
Jason
Kiril Nikolov
Telerik team
 answered on 22 Oct 2013
2 answers
184 views
Hi there,

I'm using Kendo UI Mobile for a mobile application for a client, but am struggling with the events. I have found that the page-show and before-show events are only called the first time a page is loaded. If I navigate to the same page once more these events aren't triggered a second time.

My html:
1.<div id="page_test" data-role="view" data-title="Test" data-before-show="beforeshow()" data-show="show()">
2.    <div class="view-content">
3.        Test!
4.    </div>
5.</div>
The javascript:
1.function beforeshow() {
2.    alert('beforeshow');
3.}
4. 
5.function show() {
6.    alert('show');
7.}
If this is the correct way the events should work, could someone offer any other ideas on events that trigger at for each page view?

Aidan Langelaan
Aidan
Top achievements
Rank 1
 answered on 22 Oct 2013
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
Drag and Drop
Map
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?