Telerik Forums
Kendo UI for jQuery Forum
12 answers
362 views
I spent two days battling an issue where a drop down in the grid would disappear after selecting a value and clicking out of the cell.(similar to the foreign key demo/example)

I finally figured out that switching to the parameterless .Grid<T>() call fixed the issue.  I was migrating some Telerik MVC code, so I was calling the other overload.
@Html.Kendo().Grid(@Model.TradeEntryDetails) -> @Html.Kendo().Grid<TradeEntryDetailModel>()

I don't see any reason that one should work and the other not, so hopefully Telerik can fix this.  I sure wasted a lot of time on it.
Vladimir Iliev
Telerik team
 answered on 15 Apr 2015
5 answers
453 views
Hello, I have an issue with displaying dependencies.
Not working example is here: http://dojo.telerik.com/alifO/5

First task and Second task are dependent ones, but no dependency is displayed in Gantt.

How to provide dependencies as java script array in correct way?

Script code:
var _dependencies = new kendo.data.GanttDependencyDataSource({
      schema: {
          model: {
              id: "id",
              fields: {
                  id: { from: "id", type: "string" },
                  predecessorId: { from: "predecessorId", type: "string" },
                  successorId: { from: "successorId", type: "string" },
                  type: { from: "type", type: "number" }
              }
          }
      }
  });
  var _deps = [{"id":1,"predecessorId":"5003d0fb-c6e9-4ddd-aaca-f9871eb51d30_7","successorId":"5003d0fb-c6e9-4ddd-aaca-f9871eb51d30_8","type":1}];
_dependencies.data = _deps;
  $("#gantt").kendoGantt({
      dataSource: new kendo.data.GanttDataSource({
          data: [{"id":"5003d0fb-c6e9-4ddd-aaca-f9871eb51d30_1","title":"Deploy solution","start":"2015-02-08T22:00:00.000Z","end":"2015-02-26T22:00:00.000Z","percentComplete":0.1},{"id":"5003d0fb-c6e9-4ddd-aaca-f9871eb51d30_2","title":"Test deployed solution","start":"2015-02-27T22:00:00.000Z","end":"2015-03-01T22:00:00.000Z"},{"id":"5003d0fb-c6e9-4ddd-aaca-f9871eb51d30_3","title":"Move solution to staging","start":"2015-03-02T22:00:00.000Z","end":"2015-03-17T22:00:00.000Z","percentComplete":0.5},{"id":"5003d0fb-c6e9-4ddd-aaca-f9871eb51d30_7","title":"First task","start":"2015-02-07T22:00:00.000Z","end":"2015-02-09T22:00:00.000Z","percentComplete":0.15},{"id":"5003d0fb-c6e9-4ddd-aaca-f9871eb51d30_8","title":"Second task","start":"2015-02-10T22:00:00.000Z","end":"2015-02-14T22:00:00.000Z","percentComplete":0.58},{"id":"1010b897-cc7f-41be-b2d6-d464345abc05_1","title":"2 Move solution to new site collection","start":"2015-02-08T22:00:00.000Z","end":"2015-02-19T22:00:00.000Z"},{"id":"1010b897-cc7f-41be-b2d6-d464345abc05_2","title":"2 Test moved site collection","start":"2015-02-02T22:00:00.000Z","end":"2015-02-25T22:00:00.000Z"}],
          schema: {
              model: {
                  id: "id",
                  fields: {
                      id: { from: "id", type: "string" },
                      parentId: { from: "parentId", type: "string", defaultValue: null },
                      start: { from: "start", type: "date" },
                      end: { from: "end", type: "date" },
                      title: { from: "title", defaultValue: "", type: "string" },
                      percentComplete: { from: "percentComplete", type: "number" }
                  }
              }
          }
      }),
      dependencies: _dependencies,
      views: ["day", "week", {type:"month", selected:true}]
  });
Bozhidar
Telerik team
 answered on 15 Apr 2015
1 answer
781 views

Hi,

I am trying to generate kendo ListView with cascading drop downs in it, all the other controls are working ok.

I followed the documentation and other threads in this forum with no luck

The browser not renders EntityTypeId input as drop down list

Also tried to render it in following ways:

layout.entityTypesData
= new
kendo.data.DataSource({

data: @(Html.Raw(Json.Encode(ViewBag.EntityTypes)))
});


<select data-role="dropdownlist" data-text-field="Text" data-value-field="Value" data-source="layout.entityTypesData"></select>

<select data-role="dropdownlist" data-text-field="Text" data-value-field="Value" data-bind="source:layout.entityTypesData,
value: #:EntityTypeId#"></select>

Please assist me in solving this issues

Here is my code:

@{


Layout = "~/Views/Shared/_Layout.cshtml";

}




<a class="k-button k-button-icontext k-add-button" id="add-quickLink" href="#">


<span class="k-icon k-add"></span>Add new record


</a>




<div id="listView"></div>

@section
scripts

{


<script type="text/x-kendo-tmpl" id="quickLinkEditTemplate">


<div class="quickLink-view k-widget">


<span class="handler">&nbsp;</span>


<span>


<input type="text" class="k-textbox
entityType" value="#:EntityTypeId#" name="EntityTypeId" id="EntityTypeId#:QuickLinkComponentId#" />


</span>


<span>


<input type="text" class="k-textbox entity" value="#:EntityId#" name="EntityId" id="EntityId#:QuickLinkComponentId#" />


</span>


<span>


<input type="text" class="k-textbox" value="#:Text#" name="Text" />


</span>


<span>


<a class="k-button k-cancel-button" href="\#"><span class="k-icon k-cancel"></span></a>


</span>


</div>


</script>






<script>


$(document).ready(function() {


layout.urls.root = "@Url.Content("~")";


layout.urls.getEntitiesForDropDownUrl = "@Url.Action("GetEntitiesForDropDownAsync")";


layout.entityTypesData = [{ Value: 1, Text: "Article" }, { Value: 2, Text: "Product" }, { Value: 3, Text: "Categories" }];


initListView();

initDropDownLists();

});

var
kendoDropDownOptions = {

autoBind: false,


optionLabel: "Select",


dataTextField: "Text",


dataValueField: "Value",


dataSource: {

type: "json",


serverFiltering: true,

transport: {

read: {

type: "POST",


url: layout.urls.getEntitiesForDropDownUrl,


dataType: "json",


contentType: "application/json"


},

parameterMap: function (data) {


return
JSON.stringify(data);


}


}


}


};




var initDropDownLists =
function() {


$(".quickLink-view").each(function () {


  var entityTypeComponent = $(this).find(".entityType");


var entityComponent =
$(this).find(".entity");




entityTypeComponent.kendoDropDownList({


dataTextField: "Text",


dataValueField: "Value",


dataSource: layout.entityTypesData


});




kendoDropDownOptions.cascadeFrom = entityTypeComponent.id;


entityComponent.kendoDropDownList(kendoDropDownOptions).data("kendoDropDownList");


//entityComponent.data('kendoDropDownList').value(layout.header.viewModel.PromotionEntityId);


});




};




var initListView = function() {


var dataSource = new kendo.data.DataSource({


transport: {


read: {


//returns
[{"QuickLinkComponentId":1,"EntityTypeId":1,"EntityId":1,"Text":"test1","SortOrder":0,"ParentId":1},{"QuickLinkComponentId":2,"EntityTypeId":2,"EntityId":1,"Text":"test2","SortOrder":0,"ParentId":1}]


url: layout.urls.root + "QuickLink",


dataType: "json"


},


update: {


url: layout.urls.root + "QuickLink/Update",


dataType: "json",


type: "POST"


},


destroy: {


url: layout.urls.root + "QuickLink/Delete",


dataType: "json",


           type: "POST"


},


create: {


url: layout.urls.root + "QuickLink/Create",


dataType: "json",


type: "POST"


},


parameterMap: function(options, operation) {


if (operation != "read") {


var items = {};




$.each(data.models, function(index, item) {


         for (var key in item) {


items["[" + index + "]" + "." + key] = item[key];


}


});




return items;


}


                  }


},


batch: true,


schema: {


model: {


id: "QuickLinkComponentId",


fields: {


QuickLinkComponentId: { editable: false, nullable: true },


}


}


}


});




var listView = $("#listView").kendoListView({


dataSource: dataSource,


   template: kendo.template($("#quickLinkEditTemplate").html())


}).data("kendoListView");




$("#add-quickLink").click(function(e) {


listView.add();


e.preventDefault();


});


};


</script>

}

Nikolay Rusev
Telerik team
 answered on 15 Apr 2015
6 answers
152 views

Hello,

 In your example:

http://dojo.telerik.com/IyOGA

how can i bind the <li> element to the column ShipName? It says it is not declared.

 

Thank you.

Atanas Korchev
Telerik team
 answered on 15 Apr 2015
1 answer
90 views
I require coloured ranges on my Kendo sliders, similar to the ranges on the Kendo LinearGauge and RadialGauge. Is there some way I can achieve this, or do you plan to add it as functionality at some point in the future?
Iliana Dyankova
Telerik team
 answered on 15 Apr 2015
1 answer
81 views

Hi,

We have a rich text editor in our application. User is able to copy paste images from his local disk into the editor using Chrome, but it is not working in IE9. 

Could you please suggest any solution for this issue?

Many forums say that this is a limitation in IE9 and we can't do anything about it, is that so?

Thanks in advance.

Dimo
Telerik team
 answered on 15 Apr 2015
2 answers
739 views

01.
 .Events(e =>
02.                    {
03.                        e.DataBound("onDetailsGridDataBound");
04.                        e.Edit("onRowEdit");
05.                        e.Save("fieldChanged");
06......more grid stuff
07.                    })
08.                    .Editable(editable => { editable.Mode(Kendo.Mvc.UI.GridEditMode.InCell);
09.                                                     editable.DisplayDeleteConfirmation("Are you sure you want to  delete this line item");
10.                    })

I added an event call on Save to call a javascript function, so I can determine whcih cell the user changed, as I need this in the controller for a calcuation where the changed field takes precedence. However when I used the e.model.set('TriggeringField', 'whateverFieldWaschanged'); this causes the controller to be called twice, which I can't live with as it will cause the back end auditing to log the event twice. When I put in e.PreventDefault in the JS method, then the controller is not called at all. How do I get my controller called just ONCE, AND supply the name of the field that was changed. Nolte as above I am using Incell editing.

1.function fieldChanged(e) {
2.              var colindex = e.container[0].cellIndex;
3.              if (colindex==8)
4.                  e.model.set('TriggeringField', 'UnitPrice');
5.              if (colindex == 9)
6.                  e.model.set('TriggeringField', 'DiscountPercentage');
7. 
8.          }

bobthecoder
Top achievements
Rank 1
 answered on 14 Apr 2015
1 answer
125 views

Hi,

I'd like to use the Autocomplete control as a lookup field. For example you can type in the company name, autocomplete would select the match and as soon as it was selected the field would become a HTML link to the selected object.

 

Eg. Typing ACME selects ACME Ltd.  After selection ACME Ltd. changes to a hyperlink to the company details page.

 

Is this possible with the autocomplete control?

Or would it be better to use the multi-select with a maximum item of 1?

Alexander Popov
Telerik team
 answered on 14 Apr 2015
1 answer
1.7K+ views

Hi there,

Is it possible to manually show a validation message for an input with a custom message?

I have a process that's separate to the validation rules. Part of the outcome for this process is that the validation message might need to be displayed below a field.

Is there a way of using the validator to manually trigger a message against a field? Or do I need to recreate the html for the validation message and place it on the form using code?

Many thanks,
Bill

Alexander Popov
Telerik team
 answered on 14 Apr 2015
1 answer
106 views

Hi there,

 

I think there is a bug when using mobile: 'phone'. The date in the header bar is there twice. It reads: 

<li class="k-state-default k-nav-current">
<span data-bind="text: formattedShortDate">6/10/2013 - 6/14/2013</span>
<span data-bind="text: formattedDate">Monday, June 10, 2013 - Friday, June 14, 2013</span>
</li>

 

You can see it here: http://dojo.telerik.com/OZExI

2014Q3 does not show this issue, only the new 2015Q1 release.

 

br, Chris

Atanas Georgiev
Telerik team
 answered on 14 Apr 2015
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?