Telerik Forums
Kendo UI for jQuery Forum
2 answers
101 views

I have run across a problem with the map widget when you pan the view and then call show() on a tile layer.

 

I have a link to a dojo that should reproduce this. First pan the map and then click the "show()" button.  When you do this the map image will move in the same direction that you just panned it.  This happens on both chrome and ie.

odd map dojo

Ianko
Telerik team
 answered on 15 Nov 2016
6 answers
1.5K+ views

I am using angular and have the following inside and ng-repeat:

<input kendo-time-picker ng-model="d.offDuty" k-interval="15" required /> {{d.offDuty}}

When I select say 7:00 AM the value of {{d.offDuty}} is: "2016-11-08T12:00:00.000Z"

I want the value to include the timezone (EST).  Two questions: Why is the timezone stripped and how do I get it to use the timezone?

Stefan
Telerik team
 answered on 15 Nov 2016
4 answers
246 views

I am using transport.cache for in-memory caching as described here: http://www.telerik.com/forums/query-caching#wDRMJ8_URkaUjJjENfnBcQ

I am converting my existing JavaScript to TypeScript, and here is the code I am using.

var dataSource = new kendo.data.DataSource({
    type: "webapi",
    transport: {
        read: "../api/companies/",
        cache: "inmemory"
    },
    schema: {
        data: "data",
        total: "total",
        errors: "errors"
    }
});

TypeScript won't compile the code because the cache property is not included in the DataSourceTransport interface.  Is this something that can be fixed?  If there is a different way I should be going about this, please advise.  For now, I've just modified my local copy of the definition file.

Thanks,

Joel

 

 

Joel
Top achievements
Rank 1
Iron
 answered on 15 Nov 2016
1 answer
153 views

Currently i am using kendo ui hierarchical . I try to passing ID through url but its not working .

The the problem will solve if  can  get value from filter . 

How do i get value from filter which looking 

filter[filters][0][Value_ID]:1472.

 

Alex Hajigeorgieva
Telerik team
 answered on 14 Nov 2016
1 answer
204 views

Hi, 

I have a DataSource thats performing CRUD for a grid of data. However in my destroy service when a data item is 'deleted', its either deleted or deactivated. My service can return a string, but then the DS 'requestEnd' event doesnt register the destroy response because the response is not the original object or blank.

I need a way for my service to communicate in the response whether a record was deleted or deactivated, Please advise.

Thanks and kind Regards,
Grant

Dimiter Topalov
Telerik team
 answered on 14 Nov 2016
2 answers
1.4K+ views

Hello,

I would like to select a row with JavaScript without triggering the change event, but it should fire when a mouse click is selecting a row. How can I do this? When I google I saw that in the past that the JS select and change trigger was seperated.

With kind regards,

Cees

Cees
Top achievements
Rank 1
 answered on 14 Nov 2016
17 answers
441 views
I use the custom download tool http://www.telerik.com/download/custom-download to get the smallest package possible but when a Kendo UI update is released I always find it hard to remember exactly which components I need to include in the download that I used last time. It would be helpful to include all the ticked items in the downloaded JS as comments at the top of the file. 
Kiril Nikolov
Telerik team
 answered on 14 Nov 2016
1 answer
82 views
I want the content to be divide into two lines. But as per [this][1] thread the template function does not allow a line break. So I tried setting `connectionDefaults.content.visual` with the below function:


            var getConnection = function (data) {
            var g = new kendo.dataviz.diagram.Group({
                autoSize: true
            });
            var text1 = new kendo.dataviz.diagram.TextBlock({
                text: data.label.name,
                fontSize: 16
            });


            g.append(text1);

            var text2 = new kendo.dataviz.diagram.TextBlock({
                text: data.label.value,
                fontSize: 16
            });


            g.append(text2);
            return g;
        }
But the problem here is that the `data` field does not populate the connection data due to which assigning values is not possible.


A solution for this is much appreciated.


  [1]: http://www.telerik.com/forums/split-labels-over-multiple-lines
Vessy
Telerik team
 answered on 14 Nov 2016
1 answer
442 views

Hi Kendo Team,

I have a MVC DatePicker as so: 

@(Html.Kendo().DatePicker()
  .Name("FromDate")
  .HtmlAttributes(new { style = "width: 150px" })
  .Min(new DateTime(2013, 01, 01))
  .Value(DateTime.Today.Date)
  .Format("dd MMM yyyy")
  .HtmlAttributes(new { @class = "form-control" })
)

However, whenever I selected a value, it always throws error message "The field ToDate must be a date." This only occurs after I have migrated my solution to Kendo 2016.3.1028. At first I thought it was due to culture info but kendo culture is set to "en-SG" which should take the format "dd MMM yyyy".

Thank you,

Minh Pham.

Boyan Dimitrov
Telerik team
 answered on 14 Nov 2016
1 answer
475 views

Recently I got one important problem that all my kendo grid delete button are not working.

But create and update button work fine.

I didn't know when this happened, because my recent developing function not contain delete button.

Here's one of my code:

 

        @(Html.Kendo().Grid<Template.Areas.BasicInfo.Models.COMM_ItemList>()
    .Name("grid")
    .Columns(columns =>
    {
        columns.ForeignKey(p => p.ListName, (System.Collections.IEnumerable)ViewData["ListName"], "ItemValue", "ItemName").Width(100);
        //columns.Bound(p => p.ItemIndex).Width(120);
        columns.Bound(p => p.ItemName).Width(120);
        columns.Bound(p => p.ItemValue).Width(120);
        columns.Bound(p => p.ItemMemo).Width(120);
        columns.Command(command =>
        {
            command.Edit().Text("修改");
            command.Destroy().Text("刪除");
        }).Width(160);
    })
    .ToolBar(toolbar =>
    {
        toolbar.Create().Text("新增");
        toolbar.Excel().Text("匯出Excel");
        //toolbar.Save();
    })
    .Editable(editable => editable.Mode(GridEditMode.PopUp))
    .Pageable(pager => pager.Input(true).Numeric(true).Info(true).PreviousNext(true).Refresh(true).PageSizes(true))
    .Sortable(sortable => sortable.AllowUnsort(true).SortMode(GridSortMode.MultipleColumn))
    .Scrollable()
    .Reorderable(reorder => reorder.Columns(true))
    .Resizable(resize => resize.Columns(true))
    .Excel(excel => excel.FileName(ViewBag.Title + ".xlsx"))
    .HtmlAttributes(new { style = "height:400px;width:100%" })
    .Events(events => events.Edit("edit").Save("onSave"))
    .DataSource(dataSource => dataSource
        .Ajax()
        //.Batch(false)
        //.ServerOperation(false)
        .PageSize(10)
        .Events(events => events.Error("error_handler"))
        .Model(model =>
        {
            model.Id(p => p.ListName);
            //model.Id(p => p.ItemIndex);
            //model.Field(p => p.CreateUserId).DefaultValue(User.Identity.Name); //設定CreateUserId的預設值
        })
        .Create(Create => Create.Action("COMM_ItemList_Create", "ItemListSetting"))
        .Read(Read => Read.Action("COMM_ItemList_Read", "ItemListSetting"))
        .Update(Update => Update.Action("COMM_ItemList_Update", "ItemListSetting"))
        .Destroy(Destroy => Destroy.Action("COMM_ItemList_Destroy", "ItemListSetting"))
        )
    )

 

 

 

namespace Template.Areas.BasicInfo.Controllers
{
    public class ItemListSettingController : BaseApiController
    {
        // GET: BasicInfo/ItemListSetting
        public ActionResult Index()
        {
            try
            {
                ItemList();
                return View();
            }
            catch (Exception ex)
            {
                logger.Error(ex, "ItemListSettingController");
                return new JavaScriptResult { Script = "alert('" + ex.ToString() + "');" };
            }
        }


        public ActionResult COMM_ItemList_Read([DataSourceRequest] DataSourceRequest request)
        {
            try
            {
                //var LimsMntList = db.COMM_ItemList.Where(o => o.ListName == "LimsMntList").ToList();
                return Json(db.COMM_ItemList.Where(o => o.ListName != "LimsMntList").ToDataSourceResult(request));
            }
            catch (Exception ex)
            {
                logger.Error(ex, "ItemListSettingController");
                return new JavaScriptResult { Script = "alert('" + ex.ToString() + "');" };
            }
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult COMM_ItemList_Update([DataSourceRequest] DataSourceRequest request, COMM_ItemList o)
        {
            try
            {
                if (o != null && ModelState.IsValid)
                {
                    db.Entry(o).State = System.Data.Entity.EntityState.Modified;
                    //o.LastUpdate = User.Identity.Name;
                    //o.UpdateTime = DateTime.Now;
                    db.SaveChanges();
                }
                return Json(new[] { o }.ToDataSourceResult(request, ModelState));
            }
            catch (Exception ex)
            {
                logger.Error(ex, "ItemListSettingController");
                return new JavaScriptResult { Script = "alert('" + ex.ToString() + "');" };
            }
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult COMM_ItemList_Create([DataSourceRequest] DataSourceRequest request, COMM_ItemList o)
        {
            try
            {
                if (o != null && ModelState.IsValid)
                {
                    var q = db.COMM_ItemList.Where(m => m.ItemName == o.ItemName || m.ItemValue == o.ItemValue).ToList();
                    if (q.Count > 0)
                    {
                        return new JavaScriptResult { Script = "alert('!!');$('#grid').data('kendoGrid').dataSource.read();" };
                        //RedirectToAction("UserIndex", new JavaScriptResult { Script = "alert('!');" });
                    }
                    else
                    {
                        var num = db.COMM_ItemList.Where(i => i.ListName == o.ListName).Max(i => i.ItemIndex).ToString();
                        o.ItemIndex = Convert.ToInt16(Convert.ToInt16(num) + 1);
                        db.COMM_ItemList.Add(o);
                        db.SaveChanges();
                    }
                }
                return Json(new[] { o }.ToDataSourceResult(request, ModelState));
            }
            catch (Exception ex)
            {
                logger.Error(ex, "ItemListSettingController");
                return new JavaScriptResult { Script = "alert('" + ex.ToString() + "');" };
            }
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult COMM_ItemList_Destroy([DataSourceRequest] DataSourceRequest request, COMM_ItemList o)
        {
            if (o != null)
            {
                try
                {
                    COMM_ItemList Item = db.COMM_ItemList.Find(o.ListName, o.ItemIndex);
                    db.COMM_ItemList.Remove(Item);
                    db.SaveChanges();                  
                }
                catch (Exception ex)
                {
                    logger.Error(ex, "ItemListSettingController");
                    return new JavaScriptResult { Script = "alert('" + ex.ToString() + "');" };
                }
            }
            return Json(new[] { o }.ToDataSourceResult(request, ModelState));
        }
    }
}

 

 

    public class COMM_ItemList
    {
        [Key]
        [Required]
        [Column(Order = 1)]
        [UIHint("ItemList_ListName")]
        public string ListName { get; set; }
        [Key]
        [Required]
        [Column(Order = 2)]
        public short ItemIndex { get; set; }
        [Required]
        public string ItemName { get; set; }
        [Required]
        public string ItemValue { get; set; }
        //public string ValueType { get; set; }
        public string ItemMemo { get; set; }
    }



Jalen
Top achievements
Rank 1
 answered on 14 Nov 2016
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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?