Telerik Forums
Kendo UI for jQuery Forum
1 answer
91 views
The problem I am having on iOS is that once I dismiss the keyboard by clicking "Done" the view does not pull back down to show the top drawer header. I have attached 3 screenshots. 
1. The view before the text input is selected. 
2. The view once the keyboard shows up.
3. The view after dismissing the keyboard. Notice the top header is still partially hidden under the status bar. Actually tapping back pulls it down to normal position but then I have to tap it again to actually go back. 

Ideally it should go back to screenshot #1 after dismissing the keyboard. 

Is there a fix for this? 
Kiril Nikolov
Telerik team
 answered on 30 Jun 2014
1 answer
119 views
Hi



I have make a js function which is call on button click

in which there is 59 differnt values are assign to diffenrt Html element by java script.

Now i found all Values are assign properly

but there are 2 kendo ui drop down also on page, not dropdown is
cascading so frist i assign value of 1st dropdown and accoding that
dropdown 2nd dropdown refereshed and then i had to assign values but
that 2nd drop down don't accept value.

why?

i had to put a alert in that function if i put alert then it's disply why?

code:--

if (c != null)
{
  var Country  = $("#CountryForPricing").data("kendoDropDownList");                               
 alert(c);                               
 Country.select(function (dataItem)                              
 {                                
    return dataItem.Value == c;                             
 } );                               
 CatalogPricingSetProgramExRate(c);                        
  }


execution pointer is execute this function line by line this is prove
by this alert function and " CatalogPricingSetProgramExRate(c) " is
also called but dropdown don't get value.

if alert is removed then it's not work and if i put alert then it's work why?
is there any timing issue?

can any one guide me..?

Regards,
vinit

Alexander Popov
Telerik team
 answered on 30 Jun 2014
1 answer
377 views
Hi!

I'm having a master grid which has a detail grid. In both grids I use an EditorTemplate on a ForeignKeyColumn.
The DropDown is correctly shown on the first grid, but not on the detail grid.
When I debug I can see that the template code is only called for the master grid.
I do not get any errors in console.

In the screenshot attached you can see the dropdown correctly appearing in the master grid but not in the detail grid.

Master Grid (Line 28-30):
01.@(Html.Kendo().Grid<LFG.Model.Domain.Appointment>(Model)
02.                .Name("AppointmentGrid")
03.                .Columns(columns =>
04.                {
05.                    columns.Command(p =>
06.                    {
07.                        p.Custom(LFG.Web.Constants.BtnDetail).Click("onEdit").Text(LFG.Web.Constants.BtnDetailDisplayText);
08.                        p.Edit().Text(LFG.Web.Constants.BtnEditDisplayText)
09.                            .CancelText(LFG.Web.Constants.BtnCancelDisplayText)
10.                            .UpdateText(LFG.Web.Constants.BtnUpdateDisplayText);
11.                    }).Width(LFG.Web.Constants.GridColumnWidthSmall);
12.                    columns.Command(p =>
13.                    {
14.                        p.Custom(LFG.Web.Constants.BtnPrintInformation).Click("onPrint_info").Text(LFG.Web.Constants.BtnPrintInformationDisplayText);
15.                        p.Custom(LFG.Web.Constants.BtnPrintGardenInformation).Click("onPrint_ginfo").Text(LFG.Web.Constants.BtnPrintGardenInformationDisplayText);
16.                    }).Title("Verständigung").Width(LFG.Web.Constants.GridColumnWidthSmall);
17.                    columns.Command(p =>
18.                    {
19.                        p.Custom(LFG.Web.Constants.BtnPrintDeliveryNote).Click("onPrint_deliverynotes").Text(LFG.Web.Constants.BtnPrintDeliveryNoteDisplayText);
20.                        p.Custom(LFG.Web.Constants.BtnPrintInvoice).Click("onPrint_invoice").Text(LFG.Web.Constants.BtnPrintInvoiceDisplayText);
21.                    }).Title("Stappel").Width(LFG.Web.Constants.GridColumnWidthSmall);
22.                    columns.Command(p =>
23.                    {
24.                        p.Custom(LFG.Web.Constants.BtnPrintPackingList).Click("onPrint_packinglist").Text(LFG.Web.Constants.BtnPrintPackingListDisplayText);
25.                    }).Title("Ausdrucke").Width(LFG.Web.Constants.GridColumnWidthSmall);
26.                    columns.Bound(p => p.ID).Hidden();
27.                    columns.Bound(p => p.Date).Width(LFG.Web.Constants.GridColumnWidthSmall);
28.                    columns.ForeignKey(o => o.RouteID, new SelectList(ViewBag.Routes, "ID", "Text"))
29.                        .Width(LFG.Web.Constants.GridColumnWidthLarge)
30.                    .EditorTemplateName("ForeignKeyDropDown");
31.                    columns.Bound(p => p.Description).Width(LFG.Web.Constants.GridColumnWidthNormal);
32.                    columns.Bound(p => p.TotalUnits).Width(LFG.Web.Constants.GridColumnWidthSmall);
33.                    if (User.IsInRole(LFG.Web.Filters.LFGRoles.ADM) ||
34.                        User.IsInRole(LFG.Web.Filters.LFGRoles.SADM))
35.                    {
36.                        columns.Command(command =>
37.                        {
38.                            command.Destroy().Text(LFG.Web.Constants.BtnDeleteDisplayText);
39.                        }).Width(LFG.Web.Constants.GridColumnWidthSmall);
40.                    }
41.                })
42.                .ToolBar(toolbar => toolbar.Create().Text(LFG.Web.Constants.BtnCreate))
43.                .Editable(editable => editable.Mode(GridEditMode.InLine)
44.                    .DisplayDeleteConfirmation(LFG.Web.Constants.ConfirmDelete))
45.                .Pageable(p => p.Enabled(Model.Count() > LFG.Web.Constants.GridPageSize))
46.                .Sortable()
47.                .Selectable()
48.                .Scrollable(s => s.Height(LFG.Web.Constants.GridPageSize * LFG.Web.Constants.GridLineHeight))
49.                .DataSource(dataSource => dataSource
50.                    .Ajax()
51.                    .PageSize(LFG.Web.Constants.GridPageSize)
52.                    .Events(events => events.Error("grid_error_handler"))
53.                    .ServerOperation(false)
54.                    .Model(model =>
55.                    {
56.                        model.Id(p => p.ID);
57.                    })
58.                    .Create(update => update.Action("_Update", "Appointment"))
59.                    .Update(update => update.Action("_Update", "Appointment"))
60.                    .Destroy(update => update.Action("_Destroy", "Appointment")))
61.                    .Events(e => e.DataBound("onRowBound"))
62.                .ClientDetailTemplateId("detailsTemplate")
63.            )

Detail Grid (Line14-16):
01.<script id="detailsTemplate" type="text/kendo-tmpl">
02.    @(Html.Kendo().Grid<LFG.Model.Domain.AppointmentDetail>()
03.            .Name("detailsGrid_#=ID#")
04.            .Columns(columns =>
05.            {
06.                columns.Command(command =>
07.                {
08.                    command.Edit().Text(LFG.Web.Constants.BtnEditDisplayText)
09.                        .UpdateText(LFG.Web.Constants.BtnCancelDisplayText)
10.                        .CancelText(LFG.Web.Constants.BtnCancelDisplayText);
11.                }).Width(LFG.Web.Constants.GridColumnWidthSmall);
12.                columns.Bound(o => o.ID).Hidden();
13.                columns.Bound(o => o.AppointmentID).Hidden();
14.                columns.ForeignKey(o => o.RouteDetailID, new SelectList(ViewBag.RouteDetails, "ID", "Text"))
15.                    .Width(LFG.Web.Constants.GridColumnWidthNormal)
16.                    .EditorTemplateName("ForeignKeyDropDown");
17.                columns.Bound(o => o.Start).Width(LFG.Web.Constants.GridColumnWidthNormal);
18.                columns.Bound(o => o.End).Width(LFG.Web.Constants.GridColumnWidthNormal);
19.                columns.Bound(o => o.TotalUnits).Width(LFG.Web.Constants.GridColumnWidthNormal);
20.                if (User.IsInRole(LFG.Web.Filters.LFGRoles.ADM) ||
21.                    User.IsInRole(LFG.Web.Filters.LFGRoles.SADM))
22.                {
23.                    columns.Command(commands =>
24.                    {
25.                        commands.Destroy().Text(LFG.Web.Constants.BtnDeleteDisplayText);
26.                    }).Width(LFG.Web.Constants.GridColumnWidthSmall);
27.                }
28.            })
29.            .ToolBar(toolbar => toolbar.Create().Text(LFG.Web.Constants.BtnCreate))
30.            .Scrollable(c => c.Height(250))
31.            .Pageable()
32.            .Selectable()
33.            .Sortable()
34.            .Editable(e => e.Mode(GridEditMode.InLine))
35.            .DataSource(source => source
36.                .Ajax()
37.                .Read("_ReadDetail", "Appointment", new { parentID = "#=ID#" })
38.                .Create("_UpdateDetail", "Appointment", new { parentID = "#=ID#" })
39.                .Update("_UpdateDetail", "Appointment", new { parentID = "#=ID#" })
40.                .Destroy("_DestroyDetail", "Appointment")
41.                .Model(model =>
42.                {
43.                    model.Id(id => id.ID);
44.                    model.Field(f => f.RouteDetailID).Editable(false);
45.                    model.Field(f => f.TotalUnits).Editable(false);
46.                })
47.                .ServerOperation(false))
48.            .ToClientTemplate()
49.    )
50.</script>

ForeignKeyDorpDown.cshtml (located in Shared folder)
@if (ViewData["SelectIndex"] != null && ViewData["SelectIndex"] is int)
{
    int i = ((int)ViewData["SelectIndex"]) >= 0 ? ((int)ViewData["SelectIndex"]) : 0;
    var list = (SelectList)ViewData[ViewData.TemplateInfo.GetFullHtmlFieldName("") + "_Data"];
    @(Html.Kendo().DropDownListFor(x => x)
    .Name(ViewData.TemplateInfo.GetFullHtmlFieldName(""))
    .AutoBind(true)
    .DataValueField("Value")
    .DataTextField("Text")
    .BindTo((SelectList)ViewData[ViewData.TemplateInfo.GetFullHtmlFieldName("") + "_Data"])
    .SelectedIndex(i)
    )
}
else
{
    @(Html.Kendo().DropDownListFor(x => x)
    .Name(ViewData.TemplateInfo.GetFullHtmlFieldName(""))
    .AutoBind(true)
    .OptionLabel(LFG.Web.Constants.PleaseSelect)
    .DataValueField("Value")
    .DataTextField("Text")
    .BindTo((SelectList)ViewData[ViewData.TemplateInfo.GetFullHtmlFieldName("") + "_Data"])
    )
}
@Html.ValidationMessageFor(x => x)
Daniel
Telerik team
 answered on 30 Jun 2014
1 answer
296 views
Dear Expert,

i was trying to populate dates from my server into Kendo UI Calendar. when i navigate to previous year, i would like to recreate\rebind the calendar with new dates.
I having issue where when i tried to rebind my calendar, it will hang.
Below are my code:


//on PageLoad,
01.$.ajax({
02.         url: "/test/GetTimelogJson",
03.         dataType: "json",
04.        type: 'GET'
05.     })
06.     .fail(function () {
07.        alert("fail");
08.    })
09.    .success(function (data) {
10.        $.map(data, function (value, key) {
11.                var d = +new Date(key);
12.                timelogDay[d] = value;
13.        });
14.        $("#calTimelog").kendoCalendar({
15.            value: Date.Today,
16.          dates: timelogDay,
17.          navigate: onNavigate,
18.            month: {
19.                content: '# if (typeof data.dates[+data.date] === "string") { #' +
20.                        '<div class="#= data.dates[+data.date] #">' +
21.                        '#= data.value #' +
22.                        '</div>' +
23.                        '# } else { #' +
24.                        '#= data.value #' +
25.                        '# } #'
26.            },
27.       });
28.    });


------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
When user click on navigate, i will call the onNavigate function:

 
01.function onNavigate() {
02.    try
03.    {
04.         var todayDate = new Date();
05.         //Compare date if it not equal to 2014,
06.          if (this.current().getFullYear() != todayDate.getFullYear())
07.           
08.               todayDate = this.current(); //set the todayDate to selected View
09.               reCreateCalendar(this.current());
10.            }
11.      }
12.        catch (err) {
13.         alert(err);
14.        }
15.     }

//recreate the calendar
   
01.function reCreateCalendar(compareDate) {
02.        $('#calTimelog').data('kendoCalendar').destroy();
03.        $('#calTimelog').empty();
04. 
05.        var date1 = new Date(2013, compareDate.getMonth(), 1),
06.                     birthdays = [
07.                        +new Date(2013,12, 3),
08.                        +new Date(2013,12, 5),
09.                        +new Date(2013,12, 22),
10.                        +new Date(2013, 12, 27)
11.                     ];
12.    
13.        $("#calTimelog").kendoCalendar({
14.            value: date1,
15.            dates: birthdays, navigate: onNavigate,
16.            month: {
17.                content: '# if (typeof data.dates[+data.date] === "string") { #' +
18.                        '<div class="#= data.dates[+data.date] #">' +
19.                        '#= data.value #' +
20.                        '</div>' +
21.                        '# } else { #' +
22.                        '#= data.value #' +
23.                        '# } #'
24.            },
25. 
26.        });
27.}
28.    }

Any Idea how to get the calendar working? thank you.

Regards,

CH
Top achievements
Rank 1
 answered on 30 Jun 2014
3 answers
386 views
Hi:
The following uses a jQuery selector to kick kendo off.  Can I get the value of that selector, so that I may do jQuery stuff with it.
<div id ="listView2"></div>
<script>
    $("#listView2").kendoListView({
        dataSource: { data: [ { name: "Jane Doe" }, { name: "John Doe" }] },
        template: "<div>#:name#</div>"
    });
</script>

Phil
Phil H.
Top achievements
Rank 2
 answered on 29 Jun 2014
7 answers
527 views
Hello,

I have a grid defined like so:

var dataSource = new kendo.data.DataSource({
       data: tableRows
});
var gridOptions = {
      columns: tableColumns,
      dataSource: dataSource,
      editable: true
}

$("#grid").kendoGrid(gridOptions);

Then I have my own button in my html which is used to add a new row to the grid:

dataSource.add({ field1: "value", field2: "value" });

When I click on a cell to edit its value, the little red triangle indicating the cell is dirty appears. All data is local so I want all editing to be immediately propagated to the data of the data source, and therefore I do not want this red triangle to appear.

What's the best way to achieve this?

Thanks,
Marc.
Alexander Valchev
Telerik team
 answered on 27 Jun 2014
2 answers
629 views
Hi,

I'm trying to persist the current PageSize in a grid.  To do so, I have a cookie with the previous session's PageSize in it.  On the DataBound event for the grid, I fire the following routine (uses jquery.cookie.js):

function onDataBoundBilling(e) {
    // Get cookie (if any).
    var cookiePageSize = JSON.parse($.cookie("billingPageSize"));
 
    // Push new value to PageSize.
    if ($.cookie('billingPageSize')) {
        var grid = $("#billingGrid").data("kendoGrid");
        grid.dataSource.pageSize(parseInt(cookiePageSize));
    }
}

This correctly resizes the grid to the value in the cookie.  However, the grid pager's drop down list still shows the original PageSize value.  How can I cause this to update?
wgmleslie
Top achievements
Rank 1
 answered on 27 Jun 2014
1 answer
108 views
Hi,

I need to send each rows of my grid to my C# controller.
In my js code, i use this way : 

        $("#myButton").click(function () {
            debugger;
            var applicationSectionId = $("#myComboBoxSections").data("kendoComboBox").value();
            var providerName = $("#myTbName").val();
            var typeProvider = $("#myComboBoxTypes").data("kendoComboBox").value();
            var sensTraitement = $("#myComboBoxSens").data("kendoComboBox").value();
            var parameters = $('#myGid').data('kendoGrid')._data;
            $.post(_pathRoot + "AddNewProvider",
                {
                    applicationSectionId: applicationSectionId,
                    providerName: providerName,
                    typeProvider: typeProvider,
                    sensTraitement: sensTraitement,
                    parameters : parameters 
                })
            .done(function (result) {
                debugger;
            });

Here is m model in the grid :
                    model: {
                        fields: {
                            Nom: { type: "string" },
                            Valeur: { type: "string" }
                        }
                    }

My controller method, in the .cs file is like this:
public async Task<JsonResult> AddNewProvider(int? applicationSectionId, string providerName, string typeProvider, string sensTraitement, object parameters )

Each time, all data are effectively sent, except "parameters" which is {string[1]} in VS 2012 debugger, and is finally empty.
Wich class should i use tu get rows in my controller ?

Thanks in advance.

Petur Subev
Telerik team
 answered on 27 Jun 2014
1 answer
98 views
 File upload already in the directory but my status is Error Can anybody help me, thanks in advance..

 Here's my sample Code

/////////// kendo_upload.aspx /////////////////////////////////////////////////////////////

         $("#uploaded").kendoUpload({

                async: {
                    saveUrl:"kendo_upload.aspx",
                    removeUrl:"remove",
                    autoUpload: true
                },
                onSuccess: onSuccess,
                error: onError

            });

/////////////// kendo_upload.aspx.cs /////////////////////////////////////////////////////////////////////////////

protected void Page_Load(object sender, EventArgs e)
        {
            ProcessRequest();

        }

        public void ProcessRequest()
        {

            Response.Expires = 1;
            try
            {
                HttpPostedFile file = Request.Files["uploaded"];

                if (file != null)
                {

                    string savepath = Server.MapPath("~/UploadFiles/");
                    string filename = file.FileName;
                    file.SaveAs(savepath + filename);
                    Response.ContentType = "application/json";
                    Context.Response.Write("{}");

                }


            }

            catch (Exception ex)
            {
                Response.Write(ex.ToString());
            }
        
        }







Petur Subev
Telerik team
 answered on 27 Jun 2014
5 answers
847 views
I would like to change colors in my slider.

I found that i could change the color of the selected area thanks to css class k-slider-selection
.k-slider-selection {
           background-color: #059BD8;
  }


Now i would like to do same for the "ball" shape selector  and the not selected area.

Could you help me please?
stephane
Top achievements
Rank 1
 answered on 27 Jun 2014
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
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
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?