Telerik Forums
Kendo UI for jQuery Forum
2 answers
885 views
Hi,

If I stop dragging an element outside of the drop target it 'flies' back to the original position.  Is there any way to prevent this?  Ideally, I'd like it to be able to just fade it out and have the original fade back in.  Any help would be appreciated on achieving this please?
Chris
Top achievements
Rank 1
 answered on 16 Jan 2013
1 answer
592 views
How can I scroll a data item into view? (Even if it is on a different page).
Alexander Valchev
Telerik team
 answered on 16 Jan 2013
1 answer
1.2K+ views
Hello,

i've searchd for a way to add new items to a exsisitng ListView without reading the DataSoucre again.

I want to add one or more complete filled items to the exisiting ListView that have a DataSource the question is how should i do that?

Sample-Code:
var objectListDataSource = new kendo.data.DataSource( {
               transport: {
                   read: function ( options ) {
                       $.ajax( {
                           url: '/default/GetUsers',
                           type: 'POST',
                           dataType: 'json',
                           data: { ids: ids },
                           traditional: true,
                           success: function ( data ) {
                               options.success( data );
                           }
                       } );
                   }
               },
               schema: {
                   data: 'items',
                   model: {
                       id: 'ID',
                       fields: {
                           ID: { type: "Number", editable: false, nullable: false, validation: { required: false} },
                           UserName: "UserName"
                       }
                   }
               }
           } );
 
           $( '#objectList' ).kendoListView( {
               dataSource: objectListDataSource,
               template: '<li>${ DisplayName }<div class="separator">|</div></li>',
               selectable: 'single',
               change: function () {
                   //alert( "CHANGE" );
               },
               dataBound: function () {
                   //alert( "dataBound" );
               }
           } );
If i use after the initialisation of the ListView the follwoing Code it will work but i need a way to add these items withoud rebinding the DataSource.

var myDS = $( '#objectList' ).data( "kendoListView" ).dataSource;
ids.push( 50 );
ids.push( 45 );
myDS .read();

Your help would be very welcome!
Iliana Dyankova
Telerik team
 answered on 16 Jan 2013
1 answer
162 views
I'm not sure if this is bug or I'm doing something wrong. But I have a grid with a custom template. There are data-bind:click bindings inside the template. I also have a dropdownlist on the same page that is bound to that same datasource. When the dropdownlist is bound, the click bindings inside the grid row template don't work and give an error:
 TypeError: Object [object Object] has no method 'apply'
Once i remove the binding from the dropdownlist it works. Everything else seems to be fine with the dropdownlist.



Alexander Valchev
Telerik team
 answered on 16 Jan 2013
3 answers
577 views
Hi,
Can i enable/disable checkbox of an item from a parametrer passed in the datasource?

for example:
i set my treeview with: 
checkboxes: {
                    checkChildren: true
                },
in the:
   dataSource: [{ ... }]

can i pass a parametrer for set the checkbox disable on that item? (or i can do not show a checkbox for that item)

thank you




Alex Gyoshev
Telerik team
 answered on 16 Jan 2013
2 answers
914 views
Hi,
i have create a datetimepicker, i put depth: year
i want that when i select the month in the value appear the last day of the selected month and not the first day..

i select Jan   value: 01/01/2013  so i want that when i select a month in the value there is  31/01/2013  <- so the last day.

somebody know how to do?

Thank you
Francesco
Top achievements
Rank 1
 answered on 16 Jan 2013
2 answers
311 views
i have inline editing grid with datepicker. This is working fine if i use local database(PC database) but not working if i use remote database


shared/editortemplate/DateTime.cshtml

@model DateTime?


@(Html.Kendo().DatePickerFor(m => m).Format("M/dd/yyyy"))



View:
columns.Bound(p => p.DateCompleted).Format("{0:d}").Width(80)       

Model:
 [UIHint("Date")]
 [DisplayName("Date Completed")]
 public DateTime? DateCompleted { get; set; }
when i tried to update and pick another date the tried to save, the date value become null and it weird is only happen if i connect via remote database



please advise
Vladimir Iliev
Telerik team
 answered on 16 Jan 2013
6 answers
2.6K+ views

            var dropdownDataSource = new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "Tenant/ProductList",
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        type: "post"
                    }
                },
                schema: {
                    model: {
                        id: "ProductID",
                        fields: {
                            ProductID: { editable: false, nullable: true },
                            ProductName: { editable: false }
                        }
                    }
                }
            });

            var dropDownList = $("#ProductList").kendoDropDownList({
                optionLabel: "Select product...",
                name: "ProductID",
                dataTextField: "ProductName",
                dataValueField: "ProductID",
                dataSource: dropdownDataSource
            }).data("kendoDropDownList");


At this point dropDownList = undefined??

 

Alexander Valchev
Telerik team
 answered on 16 Jan 2013
3 answers
452 views
How can I keep the selected item selected after a collapse then expand?

@{   
    if (Session["VendorList"] != null)
    {
        List<PA.Service.AdminTools.VendorDTO> vendors = (List<PA.Service.AdminTools.VendorDTO>)Session["VendorList"];
        
        @(Html.Kendo().PanelBar()
            .Name("Vendors")
            .ExpandMode(Kendo.Mvc.UI.PanelBarExpandMode.Multiple)
            .Items(panelbar =>
            {
                panelbar.Add().Text("Vendors")
                    .Expanded(true)
                    .Enabled(true)
                    .Items(items =>
                    {
                        foreach (var vendor in vendors)
                        {
                            if (vendor.IsDefault)
                            {
                                items.Add()
                                    .Text(vendor.VendorName)
                                    .HtmlAttributes(new { onclick = "SetVendorID("+vendor.VendorID.ToString()+")" })
                                    .Selected(true);
 
                            }
                            else
                            {
                                items.Add()
                                    .Text(vendor.VendorName)
                                    .HtmlAttributes(new { onclick = "SetVendorID(" + vendor.VendorID.ToString() + ")" })
                                    .Selected(false);
                            }
                        }
                    });
            })            
        )    
    }  
 }
Daniel
Telerik team
 answered on 16 Jan 2013
1 answer
398 views
We have implemented localized validation attributes which inherit form Data Annotations attributes and pull required validation strings from resource DLLs. For example, we have [RequiredLocalized] which inherits from RequiredAttribute. Everything works fine with MVC form fields, we get translated error messages when validating client-side and server-side (when JS turned off).

But when editing field values in Kendo Grid, our own RequiredLocalized validator does not seem to work client-side - invalid data get sent to the server, then the MVC validates the model and rejects it, and only then the error is returned to client.

How do we tell Kendo Grid to use our RequiredLocalized attribute in Javascript the same way as it uses [Required] ?

Also we see that Telerik Javascript files have some hard-coded validation strings, like "must be a number". Hiow do we localize these?

 
Daniel
Telerik team
 answered on 16 Jan 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?