Telerik Forums
Kendo UI for jQuery Forum
1 answer
385 views
I want to implement an Outlook / email style control when attaching files.  I need to override the Filebrowser event to NOT insert a link to the document, I just need to know the ID of the document so I can store it separately.  Is there any way to do this?  I don't see any events for File / image browsers.

Thanks.
Dimo
Telerik team
 answered on 17 Sep 2014
2 answers
317 views
1. I configured filters for grid but after changing language there are not translated. How to use messages from kendo.messages.xx-XX.min.js files in such setup:
filterable :{
            extra: false,
            operators: {
                string: {
                    contains: 'Contains',
                    eq: 'Is equal',
                    neq: 'Is not equal'
                },
                date: {
                    lte: 'To',
                    gte: 'From'
                },
                number: {
                    eq: 'Is equal',
                    neq: 'Is not equal',
                    gt: 'Greater then',
                    gte: 'Greater then or equal',
                    lt: 'Less then',
                    lte: 'Less then or equal'
                }
            }
        },

2. I use $translateProvider in AngularJS for translations and tried to setup in config also kendo.culture("en-GB"); but it doesn't work. How to setup translations for AngularJS with ability to change dynamically to be consistent with $translate service if needed 

Alexander Valchev
Telerik team
 answered on 17 Sep 2014
0 answers
103 views

I have a Master Grid/Detail Grid both containing information that compose a record of "Movements". 

The problem comes when I need to add a new record because the primary key of the record is part on the Master "Header" Row and part on the Detail Row. 

  • Due to Business requirements batch updates are mandatory.

Changing the functionality of the Detail Row onSave() and taking the values of the Master row (that can't be saved yet) seems like an odd approach.

Thanks in advanced,

D.

 

Daniel
Top achievements
Rank 1
 asked on 17 Sep 2014
4 answers
364 views
I've implemented the new filter row, quite nice by the way, but I'm having some difficulty formatting a number type column.

There are 2 things I'd like to do:
1. Format the number with no decimal places like, format: "{0:n0}". This works for the data but not the filter row. After I tab off it adds a decimal and 2 trailing 0's
2. Remove the spinners in the number type column filters.

I've tried something like  below but I can't get it to work.

          filterable: {
                                   cell: {
                                       format: "{0:n0}",
                                       template: noSpinner
                                   }
                               }   
...
function noSpinner() {
     var g = $("#grid").data("kendoGrid");
     var fRow = g.thead.find("tr[class=k-filter-row]")
     // i dont know what to do here to remove the spinners
}







Alexander Popov
Telerik team
 answered on 17 Sep 2014
1 answer
878 views
I have the following scenario:

I have a kendo ui grid in an iframe in an iframe and I'm trying to access it from the parent. I get to the grid alright but .data("kendoGrid") is undefined there. Do I have to do something special to access the grid data or datasource from outside the actual iframe and what?
Kiril Nikolov
Telerik team
 answered on 17 Sep 2014
1 answer
200 views
Any idea on how I can email reports with kendo charts in it? Or create PDF exports?
Hristo Germanov
Telerik team
 answered on 17 Sep 2014
4 answers
567 views
I have a grid within a tab strip control.    Each tab represents a set of information in a specific language.
The name of each grid is dynamically generated based on the language.  ex. ProductInfo_EN , ProductInfo_ES, etc etc

Within the grid I have an editor template defined that contains a dropdownlist.  I am editing the grid InLine.

I need to obtain the name of the parent grid from within the editor template so that I can then access cells within the grid for parameters in the loading of the dropdownlist.

I am having trouble determining the name of the parent grid (see below).   Everything works fine when I hardcode the name ... but of course that will only work for one language.   Any ideas?

<script type="text/javascript">
    function sendMasterData() {

        var rowID = $("[name=GridRowID]").val();
        var model = $(event.srcElement).closest("[data-role=grid]").data("kendoGrid").dataSource.get(rowID);

        return  {
            countrycode: model.ProductData.Country,
            lang: model.ProductData.Language,
            GlobalFieldName: model.ProductData.FieldName,
            MDTableName: model.ProductData.MasterDataTableName
        };
    }

</script>
@model NewGlobalProductCatalogue.Models.ProductInfo
@(Html.Kendo().DropDownListFor(p => p.ProductData.ProductValue)
.Name("ProductData.ProductValue.MasterDataID")
.DataValueField("MasterDataID")
.DataTextField("MasterDataText")
.DataSource(d => d
       .Read(r => r.Action("Index", "MasterDataSelection").Data("sendMasterData").Type(HttpVerbs.Post))

)
.Events(e => e.Change("ChangeMasterData"))
.AutoBind(false)
.SelectedIndex(0)


It is the clause $(event.srcElement).closest("[data-role=grid]")   that is giving me trouble.

If I just go $("#ProductInfo_EN").data("kendoGrid").dataSource.get(rowID);   It all works fine ... but of course this is useless for any other grid except the English one.

Any suggestions would be appreciated.

-Sheldon
Kiril Nikolov
Telerik team
 answered on 17 Sep 2014
1 answer
120 views
Hi , 
I have a problem using populating the grid with local data upon successful $http.get() request.
Here is the example:
http://dojo.telerik.com/EREfa
Can you elaborate why it's not working?
thanks.
Kiril Nikolov
Telerik team
 answered on 17 Sep 2014
4 answers
551 views
I'm using the Kendo UI Grid with ASP.NET MVC, Entity Framework and OData.
My grid shows the record ID in a column - so far so good.

When I click on "Add new record" in the toolbar, the ID column shows me a 0 - that makes sense for me (the new record is being edited and has no ID).
But after I click on the "Update" button it doesn't change to the correct ID (which has been returned with the JSON object by the service):
    "odata.metadata":"http://localhost:61534/api/$metadata#AssetList/@Element",
    "ID":17,
    "ManufacturerName":"TEST",
    "Name":"TEST",
    "SerialNumber":"TEST",
    "AssetStateID":1,
    "AssetStateName":"TEST",
    "NextCalibration":"2013-07-11T09:08:28.298Z"
}

Here's my webservice (post method):
public override HttpResponseMessage Post(AssetListViewModel item)
{
    // #### MG: CREATE ASSET
    RSAMS.WebUI.Models.Asset asset = new Asset();
    asset.Manufacturer = item.ManufacturerName;
    asset.Name = item.Name;
    asset.SerialNumber = item.SerialNumber;
    asset.AssetStateID = 1; // IN USE
    asset.NextCalibration = item.NextCalibration;
    db.Asset.Add(asset);
    db.SaveChanges();
 
    // #### MG: RESPONSE
    item.ID = asset.ID;
    item.AssetStateID = asset.AssetStateID;
    var response = Request.CreateResponse<AssetListViewModel>(HttpStatusCode.Created, item);
    response.Headers.Location = new Uri(Url.Link("OData", new { id = item.ID }));
    return response;
}
When I refresh the page/browser the correct ID is shown in the grid.

Here's my JavaScript code:

$("#grid").kendoGrid({
    toolbar: ["create"],
    editable: "popup",
    sortable: true,
    filterable: false,
    groupable: false,
    scrollable: false,
    resizable: false,
    pageable: {
        pageSizes: [10, 25, 50, 200, 1000]
    },
    dataSource: {
        type: "odata",
        pageSize: 25,
        serverSorting: true,
        serverPaging: true,
        transport: {
            create: {
                url: "/api/AssetList",
                dataType: "json"
            },
            read: {
                url: "/api/AssetList",
                dataType: "json"
            },
            update: {
                url: "/api/AssetList",
                dataType: "json"
            },
            destroy: {
                url: function (data) {
                    return "/api/AssetList([RW-PARAM])".replace("[RW-PARAM]", data.ID);
                },
                dataType: "json"
            }
        },
        schema: {
            data: function (data) {
                return data.value;
            },
            total: function (data) {
                return data["odata.count"];
            },
            model: {
                id: "ID",
                fields: {
                    ID: { type: "number", editable: false, nullable: false },
                    ManufacturerName: { validation: { required: false } },
                    Name: { validation: { required: true } },
                    SerialNumber: { validation: { required: true } },
                    AssetStateName: { nullable: false, validation: { required: true } },
                    NextCalibration: { type: "date" }
                }
            }
        },
        change: function (e) {
            //console.log("CHANGE HERE");
        }
    },
    columns: [
        {
            field: "CheckBox",
            width: 34,
            title: " ",
            sortable: false,
            template: "<input type=\"checkbox\" id=\"#= ID #\" class=\"checkbox-item\" />",
            headerTemplate: "<input type=\"checkbox\" id=\"grid-checkbox-select-all\" />"
        },
        {
            field: "ID",
            width: 60,
            title: "ID",
            template: "<a href=\"javascript:\">#= ID #</a>"
        },
        {
            field: "ManufacturerName",
            width: 150,
            title: "Manufacturer"
        },
        {
            field: "Name",
            //width: 100,
            title: "Name"
        },
        {
            field: "SerialNumber",
            width: 115,
            title: "Serial Number"
        },
        {
            field: "AssetStateName",
            width: 90,
            title: "State"
        },
        {
            field: "NextCalibration",
            width: 85,
            title: "Next Cal.",
            format: "{0:yyyy-MM-dd}"
        },
        {
            width: 230,
            title: " ",
            sortable: false,
            command: [
                {
                    text: "Details",
                    click: app.grid.showItemDetails
                },
                {
                    text: "Edit",
                    click: app.grid.editItem
                },
                {
                    name: "destroy",
                    text: "Delete",
                    click: app.grid.deleteItem
                }
            ]
        }
    ],
    edit: function (e) {
        e.container.find("label[for=CheckBox]").parent().hide().next().hide();
        e.container.find("label[for=ID]").parent().hide().next().hide();
    }
});

Please help.

Thanks,
miro
Daniel
Telerik team
 answered on 17 Sep 2014
1 answer
523 views
Hi,

I would like to prevent the user from changing the selected value of a dropdown list unless the shift key is pressed along with the arrow. Although I can hook a function to the keydown event of the .k-dropdown.k-widget this function is only called after the value has already been changed by the keydown event.

Is there a way to prevent this behaviour or get kendo to call my function earlier?

Regards
Georgi Krustev
Telerik team
 answered on 17 Sep 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
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?