Telerik Forums
Kendo UI for jQuery Forum
10 answers
239 views

Hello 
I'm pretty new to KendoUI Upload. I made some examples that are working fine. I have an issue on used language around file upload: The Button text is set to "Select file..." and any process is set to English ("done", etc.). I have set the culture to a different language than English:

<script src="telerik/js/cultures/kendo.culture.de-CH.min.js"></script>
...
kendo.culture("de-CH")
...

Shouldn't the text around the file uploaded not switch to it? I would expect German text based on this settings. 
And further more a question: Is it possible to use ONE file uploader for all allowed file types but with different file size definitions? Something like this:

validation: {
allowedExtensions: ['.gif', '.jpg', '.png', '.mp3', '.mp4']
}

and then to differ those for maxFileSize within the ONE file uploader:
.gif, .jpg, .png: max 1MB
.mp3 : max 5MB
.mp4: max 20MB

and as a consequence of that: saving the images into .../images saving the audio-files in .../audio and video files in .../video
Regards

Tayger
Top achievements
Rank 1
Iron
Iron
 answered on 18 Apr 2017
1 answer
231 views

Hello Team,

I have to change the styling of the lines of labels in kendo chart.

Pls Guide,

 

I am attaching one snapshot for the reference.

 

Preslav
Telerik team
 answered on 18 Apr 2017
1 answer
88 views

Hi,

I am using Kendo datepicker control for date column in MVC5 project. When we submit data and see saved data in edit, it is showing blank. It was working earlier but getting issue from last month. Is there any change in DLL. I am using Kendo.mvc.dll and version is 2014.2.1008.545. Please help. Thanks.

 

Regards,

Prakash

Viktor Tachev
Telerik team
 answered on 18 Apr 2017
1 answer
907 views

When you attach a function to the grid edit event, the parameter passed to the function contains the grid model as follows:

function onEdit(e) {
    if (e.model.isNew()) {

   ...
    }
}

I have a function in my page that sets the blur event for each cell in a row being edited. It looks as follows:

function setUpOnBlurEvent() {
    $("body").on("blur", "table tr.k-grid-edit-row input", function () {
        ...
    });
}

In the function definition above for the blur event, I need to get access to the grid model so that I can enter values in certain cells of the row being edited. How can I get access to this model. Or, is there an alternate way of inserting values into other cells in the grid row being edited from my blur event function?

 

Preslav
Telerik team
 answered on 18 Apr 2017
3 answers
240 views

I am using ASP.NET MVC Kendo UI to create a chart through using mvc code to build the chart using Plot band but its hard coded in the example below.  How can I change the plot band dynamically using the sample code provided

<div class="demo-section k-content wide">
    @(Html.Kendo().Chart<Kendo.Mvc.Examples.Models.ElectricityProduction>()
        .Name("chart")
        .Title("Spain electricity production (GWh)")
        .Legend(legend => legend
            .Position(ChartLegendPosition.Right)
        )
        .DataSource(ds => ds
            .Read(read => read.Action("_SpainElectricityProduction", "Bar_Charts"))
            .Sort(sort => sort.Add("Year").Ascending())
        )
        .Series(series =>
        {
            series.Column(model => model.Nuclear).Name("Nuclear");
            series.Column(model => model.Hydro).Name("Hydro");
            series.Column(model => model.Wind).Name("Wind");
        })
        .CategoryAxis(axis => axis
            .Categories(model => model.Year)
            .MajorGridLines(lines => lines.Visible(false))
        )
        .ValueAxis(axis => axis.Numeric()
            .Labels(labels => labels.Format("{0:N0}"))
            .MajorUnit(10000)
            .Max(70000)
            .Line(line => line.Visible(false))
            .PlotBands(bands => {
                bands.Add().From(10000).To(30000).Color("#c00").Opacity(0.3);
                bands.Add().From(30000).To(30500).Color("#c00").Opacity(0.8);
            })
        )
        .Tooltip(tooltip => tooltip
            .Visible(true)
            .Format("{0:N0}")
        )
    )
</div>
Stefan
Telerik team
 answered on 18 Apr 2017
1 answer
303 views

I have a DropdownList on my page. I have it set as follows:

@(Html.Kendo().DropDownListFor(m => m)
                        .Name("CustomerDropDown")
                        .DataTextField("DropDownText")
                        .DataValueField("RowId")
                        .OptionLabel("Select Customer or Reseller...")
                        .AutoBind(true)
                        .Filter("contains")
                        .HtmlAttributes(new { style = "width:500px" })
                        .DataSource(source =>
                        {
                            source.Read(read =>
                            {
                                read.Action("GetCustomersForPointofSaleDropDown", "Customer");
                            })
                            .ServerFiltering(true);
                        })
                        .Events(e =>
                        {
                            e.Select("onCustomerSelect").DataBound("onDropDownListBound");
                        })
                    )

Under certain circumstances I don't want the drop down list to auto bind. I don't see a Bind event I can latch on to, like I can with the data bound event, in order for me to prevent the binding from happening. Is there some way I can prevent the auto binding before it actually occurs?

Dimitar
Telerik team
 answered on 18 Apr 2017
1 answer
452 views

I have a grid (MVC) with the following set:

                .Editable(editable => editable.Mode(GridEditMode.InLine))   
                .Navigatable()                                         

               .Selectable(selectable => selectable 

                    .Mode(GridSelectionMode.Single)
                    .Type(GridSelectionType.Row))

When the user creates a new row, or when editing an existing row, I need to be able to trap when the user changes the value in a cell and moves out of the cell. I need to be able to take the new contents of the cell that changed and do some processing on it. How can I do this?

Viktor Tachev
Telerik team
 answered on 18 Apr 2017
5 answers
2.5K+ views

Hi 

I have been reading that there is a save event which gets triggered when a cell is left in the grid. I tried that and its working fine when I use GridEditMode.InCell as the edit mode. When I use GridEditMode.InLine nothing happens when I leave the cell (the function is not being called). But, the function is being called after i click on the "Update" button. In my scenario, i need to update some cells regarding to what was written in some other cells, so no use for me to call the function just before saving. So is there a method to notify me just when a cell has been left (or a value inside of a cell has been changed or selected e.g. from an autocomplete)

 

Here is my code

 

 @(Html.Kendo().Grid<Telerik2.Models.LeistungViewModel>()
        .Name("grid")
        .Columns(columns =>
        {
            columns.Bound(l => l.LeistungNr).Width(240).Visible(false);
            columns.Bound(l => l.Bezeichnung).Width(190);
            columns.Bound(l => l.Datum).EditorTemplateName("DatumPicker").Width(110).Format("{0:dd.MM.yyyy}");
            columns.Bound(l => l.MinT).Width(110); ;
            columns.Bound(l => l.Kuerzel).EditorTemplateName("LeistungKuerzel").Width(130);
            columns.Bound(l => l.MinV).Width(110);
            columns.Bound(l => l.Person).Width(160);
            columns.Command(command => { command.Edit().Text("Bearbeiten").UpdateText("Speichern").CancelText("Abbrechen"); }).Width(200);
            
        })
        
        .ToolBar(toolbar => toolbar.Create())
                .Editable(editable => editable.Mode(GridEditMode.InLine))
                .Pageable()
                .Events(events => events.Save("Save"))
                .Sortable()
                        .Resizable(resize => resize.Columns(true))
                .Scrollable()
 

)

<script type="text/javascript">
    function Save(e) {
        console.log("Cell left");
            }
    }

</script> 

 

Konstantin Dikov
Telerik team
 answered on 18 Apr 2017
1 answer
1.8K+ views

Hello,

I was wondering if there is some kind of automatic display of custom or model errors. To check this out, I created an example in the dojo.

When the returned data contains the property defined as errors within the model, the error callback is called. But I would have expect that it creates an error message within the Grid like it does with No records available (but maybe in red). Instead the grid remains empty, neither displaying the custom error nor saying No records available.

Is there a way to enable displaying custom errors within the Grid itself like the No records available message? Or will I have to push some DOM elements there by myself in the error function? If the later, is there an event which is called when no model/custom error is there anymore so I know when to remove my DOM elements showing the error?

For short reference here the last grid example from my dojo which just creates an empty grid:

01.$('#grid3').kendoGrid({
02.  columns: [{field: 'name'},{field: 'age'}],
03.  dataSource: new kendo.data.DataSource({
04.    data: { apiError: ['Server is under maintainance!'] },
05.    schema: { errors: 'apiError' },
06.    error: function(e) {
07.      console.error('grid error:', e);
08.    },
09.  }),
10.  noRecords: true,
11.});
Stefan
Telerik team
 answered on 18 Apr 2017
1 answer
834 views

In my MVC grid, I'm trapping the Edit event as follows:

 .Events(events => events.Change("gridRowChange").Edit("onEdit"))

In my onEdit() method that gets called when an edit is occurring, I'd like to get a reference to the text box elements for each editable cell in the row so that I can attach an onBlur event to some of them. How do I go about getting a reference to each text box element in the row being edited?

Konstantin Dikov
Telerik team
 answered on 18 Apr 2017
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
Iron
Iron
Sergii
Top achievements
Rank 1
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
Iron
Iron
Sergii
Top achievements
Rank 1
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?