Telerik Forums
Kendo UI for jQuery Forum
2 answers
181 views

Hello all,

 

I have a grid bound to a datasource that is receiving data from an odata-v4 endpoint. The data is loaded correctly and I have several columns with templates defined as the data has some complex values. One of the fields in this complex object is a date field (returned as so: "2015-09-01T00:00:00-05:00"). By default sorting by this column does not work, neither does formatting using the format property in the grid column (format: "{0:MM/dd/yyyy}"). So I realize I need to declare the field as a date type in the schema.model. Thus I have: 

 

 

schema: {
    model: {
        fields: {
            workPeriod: {
                startDate: {type: "date"}
            }
        }
    }
}

 

However, this does not seem to be declaring the type correctly. Is this not how you reference a complex object in the schema for a datasource?

Boyan Dimitrov
Telerik team
 answered on 27 Jan 2016
5 answers
753 views

Can anyone tell me what file and how I would modify to display node checkboxes BEFORE the node icons, See the attached mock up picture.  I would also like to improve the separation spacing slightly.

Thank you in advance,

 - Charlie

Magdalena
Telerik team
 answered on 27 Jan 2016
1 answer
243 views

Hi Telerik,

 

I'm trying to do a custom view like in this example (http://dojo.telerik.com/@ggkrustev/oZUCu) but with range selection dates (http://demos.telerik.com/kendo-ui/datepicker/rangeselection).

 Is it even possible in scheduler?

 Thank you

Vladimir Iliev
Telerik team
 answered on 27 Jan 2016
3 answers
81 views

Hi,

     I'm testing out Kendo Maps and was running the remote-markers sample offline. I was expecting the markers to appear when I run the remote-markers.html file but they do not. Index.html is working fine though. It would be great if you could suggest the possible causes as to why this is so. By the way, I'm running Kendo Professional 2016.1.112.trial.

Best Regards,

CH

T. Tsonev
Telerik team
 answered on 27 Jan 2016
1 answer
125 views

I need to set a value in inactive row.
However, If the active row is in edit mode, the value doesn't applies to the grid.

Please check following operation and code. 
Case 1 (expected case): 
 ãƒ»operation
   â‘ Click first record's "attribute" cell.(change to edit mode)
   â‘¡In browser console, below command execute.
     var item = $("#grid").data("kendoGrid").dataSource.at(0);
     item.set("attribute", "123");
 ãƒ»result
     first record's "attribute" value is changed from "foo" to "123".

Case 2 (unexpected case): 
 ãƒ»operation
   â‘ Click second record's "attribute" cell.(change to edit mode)
   â‘¡In browser console, below command execute.
     var item = $("#grid").data("kendoGrid").dataSource.at(0);
     item.set("attribute", "123");
 ãƒ»result
     first record's "attribute" value isn't changed.

     (The value of the model has been changed. But it does not apply to the grid.)

 following is test code:

<!DOCTYPE html>
<html>
<head>
    <title>KendoUI Test Page</title>
      
  
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
</head>
<body>
    <div id="grid"></div>
    <script>
    function readonlyEditor(container, options) {
        container.text(options.model[options.field]);
    }
      
    var dataSource = new kendo.data.DataSource({
        data: [
            { id: 1, item: "Item1", attribute: "foo" },
            { id: 2, item: "Item2", attribute: "bar" }
        ],
        schema: {
            model: {
                id: "id",
                fields: {
                    id: { type: "number" },
                    item: { type: "string" },
                    attribute: { type: "string"}
                }
            }
        }
    });
  
    $("#grid").kendoGrid({
        dataSource: dataSource,
        columns: [
            { field: "item"},
            { field: "attribute", editor:readonlyEditor }
        ],
        editable: true,
    });
      
    </script>
</body>
</html>


what should I do? If I want to apply the value of the model to the grid in case 2.
Boyan Dimitrov
Telerik team
 answered on 27 Jan 2016
1 answer
158 views

My grid that is bound to json data is not displaying the data. Here is my code.

<script>
        var remoteDataSource = new kendo.data.DataSource(
   {
       transport:
       {
           read: {
               type: "get",
               dataType: "json",
               url: "http://localhost:50411/EmployeeService.asmx/GetData",
               contentType: "application/json; charset=utf-8"
           }
       },
       pageSize: 4
   })
        $("#grid").kendoGrid(
            {
                dataSource: remoteDataSource,
                columns: [
                    {
                        field: "pin",
                        title: "PIN",
                        width: 600,
                        filterable: true
                    },
                    {
                        field: "firstName",
                        title: "First Name",
                        width: 100,
                        filterable: true
                    },
                    {
                        field: "lastName",
                        title: "Last Name",
                        filterable: true,
                    },
                ],
                schema: {
                    data: "list"
                },
                height: 430,
                scrollable: true,
                sortable: true,
                pageable: true,
            });
    </script>

Im using an asmx webmethod.

 [WebService(Namespace = "http://localhost/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    [System.Web.Script.Services.ScriptService]
    public class EmployeesService : System.Web.Services.WebService
    {

        [WebMethod]
        public static string GetData()
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            List<DepartmentEmployees> employees = EmployeeRules.GetDepartmentEmployeeses(Debug.GetEmployees(20));
            return serializer.Serialize(employees);
        }
    }

Alexander Valchev
Telerik team
 answered on 27 Jan 2016
1 answer
114 views

Hi..

I created kendo grid with default client side paging and grouping,its working fine,is there any possibility to apply pagination on grouped aggregate instead of total items.here is the attached image GridGrouping.jpg,

In image i'm giving page size 5 and displaying 3 aggregates ,each aggregate is having 2 items ,i want to display 

5 aggregates in a page instead of 5 items

kindly resolve my issue,

thanks in advance

Nikolay Rusev
Telerik team
 answered on 27 Jan 2016
9 answers
252 views
We have a modal that contains the upload control and if the file is not attached successfully, when the user tries to submit the form, we get a permission denied error. 

LOG: Server response: Error trying to get server response: Error: Access is denied.

We traced that the error is caused by a code in kendo.web.min.js > stopFrameSubmit:

e.contentWindow.location.href=e.contentWindow.location.href


I've also searched similar topics and came across the IE issue of upload not working across different domains. However, this is not the case for us since we don't make use of another domain in our site. Further research led me to another forum thread saying that IE denies access to the IFrame content when the response code is not 200 OK. If this is the case for other browsers such as IE, does this mean that there should be a change in the above code to accommodate this behavior?
Dimiter Madjarov
Telerik team
 answered on 27 Jan 2016
1 answer
651 views
I want to integrate the gantt chart with our ERP System. I want to send the base64 of the exported pdf to a javascript function.Neither POST to a server url or save it localy. Is there any way to just get the base64 of the pdf file without exporting/saving the file? 
Bozhidar
Telerik team
 answered on 27 Jan 2016
5 answers
1.9K+ views

I have a grid with Inline batch editing mode on. I am trying to display dropdownlist inside the grid and enable user to select values from the dropdown. The issue i am running into right now is, by default it shows null value, when clicked on that cell it shows all the dropdown values and you can select to different dropdown value. But as soon as you click outside the grid cell, it reverts the text to 'null' again. When clicked on the cell back again, it changes from 'null' to previously selected value.

ViewModel: 

 

public class CreateAsnRequestViewModel
{
    [Display(Name = "UPC UOM")]
    public string UPCUOM               { get; set; }      
      
    public string UserDefinedCode      { get; set; }      
}
 
public class CommonDetailsCommonProperties
{
    public string ProductCode          { get; set; }
    public string UserDefinedCodes     { get; set; }
    public string UserDefinedCode      { get; set; }
    public string CombinedValuesToSave { get; set; }
}
 
public class UOMItem : CommonDetailsCommonProperties
{
    public string UOM                  { get; set; }
}
 
public class CommonDetailsViewModel
{
    public List<UOMItem> UOMs          { get; set; }
}

Controller:

CommonDetailsViewModel commonDetailsViewModel = commonService.InvokeGetCommonDetails(flag);
ViewData["UOMList"] = commonDetailsViewModel.UOMs;

Views:

EditorTemplate: _UOMDropDownList.cshtml

@using System.Collections
@using Kendo.Mvc.UI;
 
@(Html.Kendo().DropDownList()
.BindTo((IEnumerable)ViewData["UOMList"])
    .DataValueField("UserDefinedCode")
    .DataTextField("UserDefinedCode")
    .Name("UPCUOM")
)

Main Razor View:

@(Html.Kendo().Grid<SupplierPortal.ViewModels.CreateAsnRequestViewModel>()
      .Name("GridViewOpenPOSelected")
      .Columns(columns =>
      {
          columns.Bound(p => p.UPCUOM).HtmlAttributes(new { @class = "editableFiled" }).EditorTemplateName("_UPCUOMDropDownList").ClientTemplate("#:UserDefinedCode#").Width(180);
      })
    .Editable(editable => editable.Mode(GridEditMode.InCell).DisplayDeleteConfirmation(false))
    .AutoBind(false)
    .Navigatable()
    .DataSource(dataSource => dataSource
                .Ajax()
                .Batch(true)
                .PageSize(10)
                .Read(read => read.Action("GetSelectedPO",   "Asn").Data("GetSelectedPOParameters"))
                .ServerOperation(false)
                .Model(model =>
                {
                    model.Id(p => p.Id);
                }))
    .Events(events => events.DataBound("gridDataBound"))
    .Events(events => events.DataBinding("gridDataBinding"))
    .Events(events => events.Edit("onEdit"))
)

 

Any help will be appreciated.

Thanks. 

 

 

 

 

 

 

Kiril Nikolov
Telerik team
 answered on 27 Jan 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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?