Telerik Forums
Kendo UI for jQuery Forum
3 answers
399 views
Hi Guys,
  I noticed a quirk when testing some code that prevents navigation in before show, as indicated here ... http://docs.kendoui.com/api/mobile/view#events-beforeShow

If I use this technique the tabstrip changes the active tab to the view that was prevented from being displayed, I have a jsfiddle here that demonstrates the issue.  Notice that if you are on view 1, or the view 1 child and you select view 2 (the one that is supposed to be prevented), the navigation is prevented but the tab strip is active on view 2.  I would expect the tabstrip to keep the same tab active as a result of the e.preventDefault call, but perhaps this is deliberate behavior.

  I have a work around for the issue (I just alter the content on view 2 instead of stopping them from navigating to it which is fine for my purposes), so I don't need a fix in a rush I just thought I would bring it to your attention in case you weren't aware.
  -David
Petyo
Telerik team
 answered on 21 Jun 2013
3 answers
392 views
Being new to JavaScript and Kendo I apologise if this is an improper use;

I want to put up a model message; for example if a user deletes something I want to put up an 'Are You Sure' message over the top of the login view. This is a trivial exercise in .Net programming but, as I said, I am new to JavaScript and Kendo. 

Looking through the Mobile Widgets the PopOver seems like a good way of doing of displaying a view over the top of another.
The demonstration shows how to display a PopOver in response to a button click but I cannot find any way of displaying it from a function.
  • Is this possible?
  • Keeping in mind this is a mobile; is there a better way to display?

Thanks for any pointers

Alan

Alan
Top achievements
Rank 2
 answered on 21 Jun 2013
5 answers
976 views
Hi,

I am trying to use grid's column resizing feature, but when I resize the last column in the grid it leaves white space. Please see the attachment to see the issue.

Thank you,

Poonam
Vladimir Iliev
Telerik team
 answered on 21 Jun 2013
1 answer
2.2K+ views
Hi,

I am trying to programmatically select a row in a Grid depending on some dataItem value. My current approach is to loop through the rows in the DataBound event handler. So far I can find the row, but when I try to select it by using addClass("k-state-selectable") I get a "Object doesn't support this method or property" error.
Here is my code:

function gServices_DataBound(e) {
try {
var servicesGrid = $("#gServices").data("kendoGrid");
if (servicesGrid) {
var selServiceName = '@ViewData["SelServiceName"]';
if (selServiceName) {
// loop thorugh grid rows and select the service with that name
$("#gServices tr").each(function () {
var di = servicesGrid.data(this);
if (di.Name == selServiceName) {
// found the dataItem
// => select it
$(this).addClass("k-state-selected");
}
});
}
}
}
catch (ex) {
alert('gServices_DataBound: Exception: ' + ex.message);
}
}

Any ideas how I can loop through the set of rows and select the one I want programmatically?

Regards
Sven
Nikolay Rusev
Telerik team
 answered on 21 Jun 2013
1 answer
638 views
Do you have any examples of having a upload control in each row of a grid used in the following way:

@(Html.Kendo().Grid<RepairModel>()
.Name("RepairGrid_#=Id#")
.ToolBar(toolBar => toolBar.Create())
.Columns(columns =>
{
columns.ForeignKey(e => e.Type, (System.Collections.IEnumerable)ViewData["RepairTypes"], "Id", "Name")
.Title("Type");
columns.Bound(r => r.Cost);
columns.Bound(r => r.RepairDate);
columns.Bound(r => r.Description);
columns.Bound(r => r.Mileage);
columns.Bound(r => r.RepairLocation);
columns.Command(commands =>
{
commands.Edit().Text("Edit");
commands.Destroy().Text("Delete");
}).Title("Actions");
})
.DataSource(dataSource => dataSource
.Ajax()
.Events(events => events.Error("grid_error"))
.ServerOperation(false)
.PageSize(100)
.Read(read => read.Action("GetRepairs", "Equipment", new { equipmentId = "#=Id#" }))
.Create(create => create.Action("CreateRepair", "Equipment", new { equipmentId = "#=Id#" }))
.Update("UpdateRepair", "Equipment")
.Destroy("DestroyRepair", "Equipment")
//.Group(g => g.Add(gi => gi.Type))
.Sort(g =>
{
g.Add(gi => gi.Type);
g.Add(gi => gi.RepairDate);
})
.Model(model =>
{
model.Id(m => m.Equipment);
model.Field(m => m.Id).DefaultValue(new Guid());
model.Field(m => m.Equipment).DefaultValue(new Guid());
model.Field(m => m.Type).Editable(true).DefaultValue(((List<RepairTypeModel>)ViewData["RepairTypes"]).Any() ? ((List<RepairTypeModel>)ViewData["RepairTypes"])[0].Id : Guid.Empty);
})
)
.Pageable()
.Sortable()
.Groupable()
.ToClientTemplate())

Thanks,

Billy Jacobs
Petur Subev
Telerik team
 answered on 20 Jun 2013
2 answers
181 views
I am currently evaluating these controls for use with our Hot
Towel/SPA-based application. I am attempting to display a drop down list
with data from our backend. I've attempted to do this with ComboxBox
and DropDownList, and both controls give me a "SCRIPT28: Out of stack
space" error.

I saw one post that said this was due to an older
version of jquery, but I'm using 1.9.1. The data is returned as a JSON
array. I set up the control in the viewAttached function:

function viewAttached(view) {
 
    $('#warehouseId').kendoDropDownList({
        autoBind: false,
        dataTextField: 'WHNAME',
        dataValueField: 'HOUSEO'
 
    });
Then in the same function, I retrieve the data:
aplusAdapter.getWarehouses(0, false, function (warehouseData) {
    //var ds = new kendo.data.DataSource({ data: warehouseData });
    var ddList = $('#warehouseId').data('kendoDropDownList');
    ddList.setDataSource(warehouseData);
    ddList.refresh();
 
});
warehouseData comes back from the controller, and contains valid data, including the WHNAME and HOUSEO fields. The dropdown list control appears to be empty. When I click on it, I get the spinning progress indicator, and the SCRIPT28 error appears. In Firefox, I get a "too much recursion" error.

What am I missing?
Petur Subev
Telerik team
 answered on 20 Jun 2013
9 answers
246 views
Hello Atanas,

this is a new post, describing the problem that we started to talk about in the "definition file for Typescript" thread.

Create a simple Typescript file test1.ts and compile for AMD
export var NAME = "mike";
Create another Typescript file test2.ts with a shortened version of your code. It compiles perfectly.
/// <reference path="kendo.all.d.ts" />
 
module kendo.data.binders {
    export class custom extends Binder {
      constructor(element: Element, bindings: { [key: string]: Binding; }, options?: any) {
         super(element, bindings, options);
      }
   }
 }
Now create another Typescript file test3.ts. Regarding your code it is the same as test2. It additionally imports test1.
/// <reference path="../dts/kendo.all.d.ts" />
 
import T1 = module("test1");
 
module kendo.data.binders {
   export class custom extends Binder {
      constructor(element: Element, bindings: { [key: string]: Binding; }, options?: any) {
         super(element, bindings, options);
      }
   }
}
Now there are problems, not being able to find Binder, Binding, etc.

Michael G. Schneider
Atanas Korchev
Telerik team
 answered on 20 Jun 2013
1 answer
413 views
Is it possible to change the bar color when a bar is clicked?  If I have 5 orange bars I want to click on one and have it turn blue.  Then if I click a different one the blue one turn orange and the new clicked one turns blue.  Is this possible without having to generate the entire chart?
Iliana Dyankova
Telerik team
 answered on 20 Jun 2013
1 answer
359 views
  Hi All,

How to achieve the grid containing check- box   for selection and textbox  to get input as attached in screen.

so  user will input the value in textbox and selected the row using checkbox and click save button.


I am using MVC4+kendo ui grid.

Dimiter Madjarov
Telerik team
 answered on 20 Jun 2013
46 answers
275 views
When reading the documentation I rather often do not know, what datatypes are expected as parameters or which datatype is returned from a method call. I appreciated, if these details were given in the documentation.

Let me make an example. Look at TreeView expand method. The parameter is described as "nodes Selector". What does this mean? Is it a jQuery selector such as "#tree" or "div.tree"? Or is this an DOM object or maybe a jQuery object? The samples show that probably both a selector or a DOM object can be given to the method. If this is so, I would like to read it in the documentation.

A user might also try to find out about method parameters by looking at the TypeScript definition. There he will find...
class TreeView extends kendo.ui.Widget {
    expand(nodes: string): void;
}
Probably this is not correct, as the samples show that also a DOM object can be expanded.

Michael G. Schneider
Atanas Korchev
Telerik team
 answered on 20 Jun 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
Drag and Drop
Application
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?