Telerik Forums
Kendo UI for jQuery Forum
2 answers
924 views
I there a way to create a remote DataSource for an AutoComplete that uses "contains" instead of "startswith"?  I tried specifying the filter like so:

$("#SearchFor").kendoAutoComplete({
        minLength: 2,
        dataTextField: "FullText",
        dataSource:
            {
                type: "json",
                serverFiltering: true,
                serverPaging: true,
                pageSize: 20,
                filter:
                    {
                        field: "FullText",
                        operator: "contains",
                        value: $("#SearchFor").val()
                    },
                schema:
                    {
                        data: "data",
                        count: "count"
                    },
                transport:
                    {
                        read: applicationPath() + "/Home/SearchForStuff"
                    }
            }
        });

but, it was changed/overridden by the component on the AJAX request.
John Thompson
Top achievements
Rank 2
 answered on 25 Dec 2012
2 answers
291 views
Hi..
I'm trying to create a simple email form in a listview. But the TextArea does not show up on an iPad.
Any ideas?
Do you have a similar sample or example of mobile form to send email
thx

  <ul id="SendEmail">

                    <li>Your Name<span class="list-item-data"> <input id="name" style="width: 100%" required="required" type="text" class="k-input"></span></li>
                    
                    <li>Your Email<span class="list-item-data"> <input id="email" style="width: 100%" required="required"  type="email" class="k-input"></span></li>
                  
                    <li>Message<span class="list-item-data">
                    
                
                    <textarea id="txtMsg" style="background-color: #FFFFFF; border-style: solid;  border-width: 1px; width: 100%"></textarea> 
                        
                         
                    </span></li>
                     
                    <li><br /><a class="button" data-role="button" data-click="sendClick" href="#button-send"  style="color: #fff; background-color: #f60">Send</a></li>
                 
                </ul>
Jon_BCV
Top achievements
Rank 1
 answered on 25 Dec 2012
1 answer
205 views
 Hi

I have a KendoUI web grid on a Asp.NET MVC 4 Razor Page. I'm using the simple jquery Kendo grid and not aspnetmvc helpers.
The read datasource is provided by an WEB API (mvc api controller) method which returns 15 data rows (attached image shows the debug mode and 15 rows).

When my page is loaded I see my grid with 15 rows and paging count/size is correct. But only the first row has data values, all other 14 rows are empty (second attached image). As you can see in my first attached image with debug mode I have data values in my third row (all rows have values) in C# object, but only the first one is filled in the grid...

With F12 in chrome we can take a look on the data returned and that seems only the first one has values (you can see it on second attached image)... WHY ? Is it a json conversion issue ?

I really don't understand what is the problem, I have already filled another grid in the same project with another Entity data type and it worked well. The difference between the two Entity data types is that the first one (which worked) don't have complex types (Entity Navigation Properties) and the second one has several complex properties and virutal Lists (referenced tables).

Any help can be appreciated.
Thanks in advance.

Best regards,
Pedro
Petur Subev
Telerik team
 answered on 25 Dec 2012
1 answer
229 views
I'm somewhat disappointed by the lack of debugging information given by default for the Kendo Html helpers. The only way I've so far been able to tell what I'm doing wrong with them is with a try-catch, which most people around the web say is poor practice at best. So my question is, is there a better way to catch all errors on the view and log them somehow? Or redirect to  Or a way to do less of the Kendo logic in the view?

As an example, here's what I've come up with for catching errors.

@(
    try {
        @Html(.Kendo().Grid(Model)
            // etc.
        )
    }
    catch(Exception e)
    {
        @Html.Raw("<pre>" + e + "</pre>");
    }
)

Which works for debugging, but is very inelegant. Without this exception catch block, I wind up with a zero-byte response which is just a blank screen.

I realize this problem isn't unique to the Kendo Asp.NET MVC exceptions, but the code used to generate the fancy-ness is quite heavy in terms of syntax and computations. Is there any intrinsic logging or exception handling included with Kendo?

Also, any tips on debugging the client side code would be appreciated. Are un-minified versions of the javascript available? Can you specify the html extension methods to generate line breaks so the widget code is easir to read?
Petur Subev
Telerik team
 answered on 25 Dec 2012
1 answer
95 views
I have a datasource binding to remote data. The model of remote data has many fields. I found that if I do not define schema.model.fields, all fields from remote will be processed, while if I define it, only data in defined fields will be processed. I just want to define part of remote fields, let other fields be defaults.

ds = new kendo.data.DataSource({
    schema: {
        model: {
            id: 'UID',
            fields: {
                UID: { type: 'number', defaultValue: -1 }
                // Can I ignore other 20+ fields?
            }
        },
    },
    transport: {
        read: '/Path/To/ReadData',
create: ...,
update: ...
    }
}

The reason I want to do so is, when I add an item to the datasource then sync, the create action is not triggered. I debugged into source code and found that for the new item, its status is not 'created' since my default value -1 is not equal to "default" defaultValue of ""(empty string). So I think if I could define the id field and ignore other fields, this could be resolved. I know I can define all fields to make it work, but those other fields I don't care. For now, as a workaround, I have to set the id of new item to empty string to make create new item working.

Thanks,

Lei
Alexander Valchev
Telerik team
 answered on 25 Dec 2012
1 answer
440 views
Hello,
I would like create a simple Master Detail page, this is the demo page:
http://beta.iper.net/kendo/master-detail/

What is the Best practice to implement a Data Source Master Detail page?

On past I have used ADOBE SPRY and it's have a easy mode to link master data source with detail data source, this is a demo of SPRY:
http://adobe.github.com/Spry/demos/gallery/index.html

Kendo can find useful hints ;)

Thank you!
Alexander Valchev
Telerik team
 answered on 25 Dec 2012
3 answers
358 views
I have a treeview with a shared HierarchicalDataSource. 
I'm using binding to remote data like in the demo http://demos.kendoui.com/web/treeview/remote-data.html
I've enabled checkboxes and set autoSync on the DataSource to true.

When I click open a node, I get RangeError: Maximum call stack size exceeded
and the node doesn't open.

As an alternative, I tried manual syncing, but then only the root nodes that changed are send to the server, not the child nodes.

Is there an explanation/example somewhere on how to persist (checkbox) data with a treeview?
All the demos I can find are working with readonly data.
Alex Gyoshev
Telerik team
 answered on 25 Dec 2012
2 answers
90 views
Hi,

the datasource documentation (http://docs.kendoui.com/api/framework/datasource#filter) says, that the transport object can also be used with local / in-memory data.

All samples are based on transport objects with remote data.

Can anybody show a small sample which uses the transport object with local data und implements methods for create, read and update to see how data is manipulated and made persistent in the local data store.

Thanks
Florian
Florian
Top achievements
Rank 1
 answered on 24 Dec 2012
1 answer
112 views
This is my first time using Kendo UI and I want to get a Json object from a Json file.

The Json string from Java controller looks like 
{"model": "Contract","rules": [{"initValues": ["5000"],"applyToFields" :["name","number"],"name": "MaxLengthRule"},{"name": "StartDateEndDateRule","applyToFields" :["startDate","endDate"]},{"name": "HierarchyValidationRule","applyToFields" :["hierarchy"]},{"name": "MasterContractValidationRule","applyToFields" :["hierarchy", "master"]},{"name": "JudgeDuplicatedRule","applyToFields" :["number"]},{"name": "ContractTypeRule","applyToFields" :["type"]}]}

And below is the script code. I want to get the rule attribute one by one. Now the alert with "Success!!!!!!!" is shown, 
 but I can only see some "undefined" in page after that. Could you help me on how to convert the Json string? Thanks a lot.


<script>
// document ready function
$(document).ready(function() {

var $validation = $("#validation");

// make an ajax call 
// to retrieve a JSON response 
$.ajax({
   // the url to the service
   url: "validation.do",
   contentType: "json",
   success: function(data) {
    alert("success!!!!!!!!!");
       $.each(data, function(index, item){
   $validation.append("<tr><td>" + item.model + "</td>" +
         "<td>" + item.rules + "</td></tr>");
       });
   }
});
});
</script>

Thanks
Best regards
Arnold
Atanas Korchev
Telerik team
 answered on 24 Dec 2012
2 answers
390 views
Can a ListView use an edit type template (with two-way data-bind attributes), so that when the listview is bound to its data all its items are immediately editable on first display?  This would be weird if there were a lot of items (multiple pages) in the listview, but it is not so strange with just one or two. Or does the two way binding only happen when a call to listview.edit() (or its declarative alternative) is made to invoke the use of that template?  The editing listview demo requires the user to click an edit button, and thus requires there to be both  a display template and separate edit template.
Atanas Korchev
Telerik team
 answered on 24 Dec 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
Date/Time Pickers
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)
SPA
Filter
Drawing API
Drawer (Mobile)
Globalization
Gauges
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
OrgChart
TextBox
Effects
Accessibility
ScrollView
PivotGridV2
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Collapsible
Localization
MultiViewCalendar
Touch
Breadcrumb
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
Popover
DockManager
FloatingActionButton
TaskBoard
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
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?