Telerik Forums
Kendo UI for jQuery Forum
4 answers
568 views
Hi,

I would like to be able to hook the 'change' event to be able to test whether the current AutoComplete value would be in the suggestions. Since the widget already searched for the value to see if it is in suggestions I would prefer to be able to check the result of that search. Something like calling kendoAutoComplete.search() but not have it affect the UI - just tell me if it was found or not. Is that possible?

I want to be able to alter the UI if the user has entered a value that is not detected in the suggestions to let them know it is not a valid value, and it seems silly to have to manually see if the value is in the datasource (and handle the filter variants 'startsWith' and 'contains') when that is already being done by the widget. So, I'm just looking to detect whether the search done by the widget found the value in suggestions or not.
Nencho
Telerik team
 answered on 09 May 2017
1 answer
1.9K+ views

This is my code on my Client Template 

        column.Bound(c => c.DeclarationsSigned)
            .ClientTemplate(
                "# if(DeclarationsSigned) { #" +
                     "# if(DeclarationsSignedByAssessor) { #" +
                        "<label style='color:red;'>Yes</label>" +
                        "# }else {#" +
                        "<label style='color:green;'>Yes</label>" +
                        "# } #"+
                "# } else { #" +
                    "<label style='color:red;' >No</label>" +
                //"< a href = 'javascript: void(0)' title = 'Signed Declaration' class = 'grid-action-inline' onclick =\" signOffDeclaration(<#=ProgramAssignmentId#>,<#=LearnerFullName#>)\"><span class='glyphicons glyphicons-pencil'></span></a>" +
                "<a href='javascript: void(0)' class = 'grid-action-inline' title = 'Signed Declaration' onclick = 'signOffDeclaration(#= ProgramAssignmentId # , #= LearnerFullName #)'><span class = 'glyphicons glyphicons-pencil' ></span></a>" +
                "# } #").Width(50);

And this is my function 

    function signOffDeclaration(AssignentId,LearnerFullName) {
        if (!confirm("I declare that I have a hard-copy of the declaration document signed by {learner name} for {programme}. I will upload this into the POE folder.")) {
            return;
        }

        $.ajax({
            type: "POST",
            url : "/Home/AssessorHome/SignDeclarationOff",
            data: { assignmentId: AssignentId },
            datatype: "json",
            sucess: function (data) {
                console.log(data);
            },
            error: function (xhr, ajaxOptions, thrownError) {
                console.log(xhr.responseText);
            }
        })

        $("#LearnerListGrid").data("kendoGrid").dataSource.read();
    }
i am getting this error when clicking a pencil Uncaught SyntaxError: missing ) after argument list

how do i solve this error

Dimiter Topalov
Telerik team
 answered on 08 May 2017
1 answer
170 views

In the single example for the ButtonGroup demo there is a bit of static CSS which is overriding any of the themes:

 

.k-button-group .k-button { background-color: rgb(44, 35, 43);}

 

I recommend removing it so users can see the theme variances properly.

Stefan
Telerik team
 answered on 08 May 2017
3 answers
945 views

Hi there,

I have a few grids in the AngularJS (v.1.x) app where i face issue is in Pagination as well as Filter Dropdown / List. When there is a grid in the page as the last element of a page following problems occur : 

1) Grid Filter

Once i filter any column and let say no rows are displayed because it's not matching the data as per the filter. Now Grid height is smaller than before and if i click on filter again (filter list height is larger than grid size in this case), it's flickering. 

If i scroll a bit the page then it works fine, it renders list in top position instead of bottom. Unless I scroll, problem is not solved.

 

2) Grid Pagination Dropdown

It similar to 1) only difference is in reproducing. Here i am changing page size from 300 to 10 and trying again to do the same but starts flickering. Once i scroll it solves the problem.

Summary :

Such scenarios where grid is end of page this problem occurs and in my application i have used lots of grid in this scenarios. 

AngularJS Version : 1.5.5
Kendo Version : 2016.1.412
jQuery Version : 1.9.1 / 2.x (tried both)

Any help from Kendo Team will be greatly appreciated!

Thanks,

Hardik

 

Dimiter Topalov
Telerik team
 answered on 08 May 2017
3 answers
787 views
To dynamically change the language of my application i' trying to use databinding to a viewmodel. It works great on labels and simple texts, but when i bind a button with e.g.

<a data-role="button" data-bind="text: i18n.connect" data-click="app.connectClicked">TEST</a>

I get an error message:
The text binding is not supported by the Button widget

Is there a workaround for this?

TIA
Peter





Ivan Zhekov
Telerik team
 answered on 08 May 2017
3 answers
730 views

I would like to use a template for my upload widget that creates a link to the file so the user can preview them.  However I can't figure out how to pass the file path into the template.

 var draftFiles = [
@foreach(var a in Model.InvoiceDraftCopies)
{
@:{ name: "@(a.FileName)", extension: "@(a.FileExtension)", size: "@(a.FileSize)", path: "@(a.FilePath)" },
}
];

template: kendo.template("<a href='#=path#' target='_blank'>#=name#</a><button type='button' class='k-upload-action'></button>")

I added "path" to the initialfiles array, but can't get to it in the template.  I get an error on #=path#. ('path' is undefined).

Plamen
Telerik team
 answered on 08 May 2017
2 answers
289 views

I'd like some advice on whether I should stay with webforms, or move onto kendo ui. I do web app development in a public hospital. I'm in the reporting area, rather than IT, but mainly I develop handy little data-centric apps where the main patient management system is too cumbersome and limited, or spreadsheets are too fiddly and error prone. There is almost always an element of looking up some data from our data warehouse (enter a number and get all the information we have about the patient, their hospital episodes etc), plus add extra data, such as: when did I try to contact this patient? what status will I assign to them on the waitlist now etc. 

I have done all of this using a very simple approach using webforms, sql server, mainly sqldatasource for databinding, and either Telerik ajax or straight javascript/jquery. The whole MVC and Entity framework thing - yes I can see it has its advantages for more complex applications, but it all seems overkill for what I do.

However, when I look at Kendo UI, I am attracted by the simplicity and elegance of the code. I do sometimes get a bit of a mess with the combination of client-side and server side code, and try to deal with all sorts of events on what is often in effect a single page app. 

This is what I'd LIKE to do, (but is it possible or advisable?):

1. Create apps that use only html, javascript/query and kendo UI
2. Keep the data binding really simple still - but perhaps move to something a bit more sophisticated like Dapper
3. Avoid MVC, Angular, React, entity framework etc etc that seem to require so much coding and abstraction, and sometimes get in the way

I suppose I'm more of a workplace problem solver and UI designer than a coder (as you may have picked up already) - my "customers" think what I do for them is great - of course they don't know that the bits they can't see are decidedly uncool and unhip.

Well, this has been a bit of a ramble, but if anyone could perhaps point out some good tutorials or a book that would be useful I'd be most appreciative.

 

Antony
Top achievements
Rank 1
Iron
 answered on 07 May 2017
6 answers
2.0K+ views

Hello. I am trying to work with a ForeignKey DropDownList in the Edit event and at the time the Edit event fires, the kendoDropDownList has not been created yet. Is there an event that I can work with after Edit to modify Kendo widgets that are created at that time?

Background - I want to disable the dropdownlist if another property is false. This works fine responding to that field change because the dropdownlist is already created.

Relevant simplified snippets:

C#

events.Edit("onEdit");
 columns.ForeignKey(b => b.MyProperty, (System.Collections.IEnumerable) ViewData["MyData"], "Option""Option")

 

JS

function onEdit() { 
  dropDownElement = $("#MyProperty"); //good
  var dropDown = dropDownElement.data("kendoDropDownList"); //undefined
  dropDown.enable(false);
}

 

Thanks for reading!

Boyan Dimitrov
Telerik team
 answered on 05 May 2017
1 answer
516 views

When trying to edit, add or delete from a grid I am using the external form or reactive forms editing customization setup described on the Kendo UI site. I'm getting these 2 errors

Build:Binding element 'dataItem' implicitly has an 'any' type 

Build:Binding element 'sender' implicitly has an 'any' type 

These are the locations where they are called. Any suggestions would help. Thanks

 protected addHandler({ sender }) {
      protected addHandler(sender: any) {
            this.closeEditor(sender);
            
        sender.addRow(new Product());

}

public editHandler({ dataItem }) {
        this.editDataItem = dataItem;
        this.isNew = false;
    }

 

 

Rosen
Telerik team
 answered on 05 May 2017
1 answer
160 views
We are embarking on a new project with Kendo MVVM as our client side framework.  I'm wondering if there is a proscribed way for testing our logic on the client.  We've never written tests for our client script/databinding before, so I'm not even sure what questions I'm looking to have answered.  I'm assuming there are probably some patterns we could/should be following with our MVVM implementation to make more of our logic testable, and I'm assuming there are some preferred tools out there to help automate tests.  Can anyone point me in a direction for me to do some more research? 
Martin
Telerik team
 answered on 05 May 2017
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?