Telerik Forums
Kendo UI for jQuery Forum
0 answers
113 views
A
 1
 2
 3
B
 1
 2
 3
I have tree view which has editable functionality. When user edits the node and click on save, it should save the newly edited nodes in an array. I gone through some examples given and tried observablearray, assigning new data to the datasource but it is not recorded. Please help!. Thank you.
Pradeep
Top achievements
Rank 1
 asked on 07 Sep 2012
1 answer
85 views
I am using the Kendo UI web version Trial.
I am using jQuery 1.8.2 and I am unable to create the dateTimePicker in my asp.net mvc website.

I receive a Javascript error stating that the "Object does not support this Property or Method".
I think this might be due to referencing it incorrrectly.
I have looked at the source of the rendred page and it looks ok.

I am not sure what all I should include for it? Please let me know.

Thanks
Nohinn
Top achievements
Rank 1
 answered on 07 Sep 2012
0 answers
485 views
I'm trying to get the DatePicker inside my grid's custom popup editor to init/show the Date from my DataSource ...
Here's a fiddle to show you what I mean: http://jsfiddle.net/kzpzC/4/

<div id="grid" class="k-content clearfix"></div>

<script id="templ" type="text/x-kendo-template">
    <div data-container-for="expires_at" class="k-edit-field">
        <input type="date" name="expires_at" data-bind="value:expires_at" data-role="datepicker"/>
    </div>
</script>


$('#grid').kendoGrid({
    dataSource{
        data[
            {
            name'test 1',
            expires_at"2010-11-01T00:00:00Z"},
        {
            name'test 2',
            expires_at"2012-04-25T00:00:00Z"}
        ],
        pageSize10
    },
    columns[
        {
        field"name",
        title"Name",
        template'<strong>#=name#</strong>'},
    {
        field"expires_at",
        title"Date",
        template'#= kendo.toString(new Date(expires_at), "MM/dd/yyyy") #',
        width"100px"},
    {
        command["edit"],
        title"&nbsp;",
        width"210px"}
    ],
    editable{
        mode"popup",
        templatekendo.template($('#templ').html(){
            useWithBlockfalse
        }),
        updatetrue,
        destroyfalse
    }
});​


Maybe someone can point me in the right direction ...!?

thanks
Philipp
Top achievements
Rank 1
 asked on 07 Sep 2012
4 answers
422 views
Hi!

How do i make so this code work? 
var grid = $("#GridField").kendoGrid();
 
function grid_selected(e) {
    var id; 
    
    grid.select().each(function() {
    // CRASH HERE.. Doesent get a dataitem.  
        var dataItem = grid.dataItem($(this));
        id = dataItem.SalonID;
        
        })
 
    window.location.href = "@Url.Action("Details", "Salon")" + "/" + id;
}

The problem is that i doesent get out a SalonID value so i can redirect.

Here is the full code:
<p>
@(Html.Kendo().AutoComplete()
   .Name("searchField")
   .DataTextField("SalonName")
   .Filter("Contains")
   .Placeholder("Search..")
 
   .DataSource(dataSource =>
     {
         dataSource.Read(read =>
         {
             read.Action("GetAutoCompleteItems", "Salon"); 
         })
     .ServerFiltering(false);
     })
     .Events(events => events.Change("autoComplete_selected"))
 )
 </p>
 
 <div id="Grid">
@(Html.Kendo().Grid(Model)
    .Name("GridField")
    .Columns(columns =>
    {
        columns.Bound(item => item.SalonID);
        columns.Bound(item => item.Avtnr);
        columns.Bound(item => item.SalonName);
        columns.Bound(item => item.Street);
        columns.Bound(item => item.ZipCode);
        columns.Bound(item => item.City);
        columns.Bound(item => item.Telephone);
        columns.Bound(item => item.SalonEmail);
        columns.Bound(item => item.Description);
        columns.Bound(item => item.ContactPerson);
    })
    .ColumnMenu()
    .Groupable()
    .Pageable()
    .Sortable()
    .Resizable(resize => resize.Columns(true))
    .Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
 
    .DataSource(dataSource => dataSource
        .Ajax() 
        .Read(read => read.Action("Read", "Salon"))
        .ServerOperation(false)
    )
    .Events(events => events.Change("grid_selected"))
)
</div>
 
 
<script type="text/javascript">
 
var grid = $("#GridField").kendoGrid();
 
function grid_selected(e) {
    var id; 
    
    grid.select().each(function() {
  var dataItem = grid.dataItem($(this));
// CRASH HERE.. Doesent get a dataitem. 
id = dataItem.SalonID;
        
        })
 
    window.location.href = "@Url.Action("Details", "Salon")" + "/" + id;
}
 
//
// Filter the grid when searching..
//
 
function autoComplete_selected(e) {
    var value = this.value();
    if (value) {
       grid.data("kendoGrid").dataSource.filter({ field: "SalonName", operator: "contains", value: value });
    }
    else {
       grid.data("kendoGrid").dataSource.filter({});
    }
}
 
</script>


I also in want that when i type 1 letter in the autocomplet, the grid should filter directly & right now im only avalible to search/filter 1 column in my db, i want to choose several tables to be searchable.

Ty!
Stefan
Top achievements
Rank 2
 answered on 07 Sep 2012
3 answers
246 views
I am new to Kendo UI as well as MVC 4 ... i am trying to use this Kendo UI calender in a view but its not showing up... what am i missing ... I am using basic MVC 4 template in Visual studio 2010 and included all js and styles in it

I have given proper js and css links in _Layout.cshtml

Plz help
Kushal
Top achievements
Rank 1
 answered on 07 Sep 2012
3 answers
674 views
is it possible to programmatically apply a filter to the grid onload?
i.e. the filter when loaded already has a filter applied?

thanks 
John
Top achievements
Rank 2
 answered on 07 Sep 2012
0 answers
81 views
Hello,
I use Kendo Grid. I need create template filter for each column. How I can do it?
Iliya
Top achievements
Rank 2
 asked on 07 Sep 2012
2 answers
414 views
Maybe i am just old.. but i have worked on this thing all day with no love.

This is my latest:

$(document).ready(function () {
            var selectedRegionId;
            var dsCategories;

            $("#selectCategory").width(180).kendoComboBox({
                dataTextField: "CostDriverCategoryName",
                dataValueField: "CostDriverCategoryId",
                dataSource: dsCategories
            });


            dsCategories = new kendo.data.DataSource({
                transport: {
                    read: "/CostDriver/GetCostDriverCategoriesByRegion/" + $("input[name='region']").val(),
                    data: $("input[name='region']").val()
                }
            });

            $("#selectCommodity").width(180).kendoComboBox({ enabled: false });

            $("input[name='region']").click(function () {
                // alert(selectedRegionId);
                dsCategories.read();
            });
        });



I have a few issues:

1. HOW do you make the "data" parameter in the transport read work for a GET call to an ASP.Net MVC JsonResult controller method? I have searched the docs and these forums. I see people avoiding the wrapper and calling using jquery Ajax directly.. but seriously,, this datasource is a wrapper for Jquery ajax calls.. does it not work????

2. My result is a JSON object that looks like:

[{"CostDriverCategoryId":2,"CostDriverCategoryName":"Chemicals","ShortName":null},{"CostDriverCategoryId":3,"CostDriverCategoryName":"Currency","ShortName":null}
]

What do i need to do to have this result actually bind to the combobox as i defined in the combobox itself? I can get the result from the read by passing the data value right in the URL itself. Fine.. But it does not bind to the combobox.

Thanks.

Nohinn
Top achievements
Rank 1
 answered on 07 Sep 2012
1 answer
629 views
Here below is my code.  How do you get the primay key value.  I can see the correct field in the debugger under
this._data._key.ID=3 this is correct, I just need some help getting that value.  I have searched the forums but couldn't find a working example

Thanks.

function BindData (myArray){
     
         $(document).ready(function() {
 
            $("#grid").kendoGrid({
                dataSource: {
                    data: myArray,
                    pageSize: 10
                },
                   change: onChange,
                selectable: "multiple",
                navigatable: true,
                groupable: true,
                sortable: true,
                pageable: {
                    refresh: true,
                    pageSizes: true
                },
                columns: [ {
                    field: "firstname",
                    width: 90,
                    title: "firstname:"
                },
                {
                    field: "lastname",
                    width: 90,
                    title: "lastname:"
                }                   
                ]
            });
        });
    }
       function onChange(arg) {
                    var selected = $.map(this.select(), function(item) {
                        return $(item).text();
                    });
 ;
 
                     
                    sources.people.select(1)
                  kendoConsole.log("Selected: " + selected.length + " item(s), [" + selected.join(", ") + "]");
     
                }
OnaBai
Top achievements
Rank 2
 answered on 07 Sep 2012
2 answers
390 views

Hi,

I want to change the default text for update and cancel commands when inline editing (edit and destroy commands are not problem). How can I do that?

Also, is it possible to have both inline and popup editing in the same row (but with different commands) ?

Thanks

(sorry for my bad english:)

OnaBai
Top achievements
Rank 2
 answered on 07 Sep 2012
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?