Telerik Forums
Kendo UI for jQuery Forum
9 answers
3.1K+ views

Hi team !

I'm trying to work with the inline edit mode, but I can't manage to call my controller's method when a value is changed.

My grid is diplayed correctly, and I can click on the edit button, that makes the update and cancel button appear. Cancel works fine, but Update doesn't. In fact, both buttons are doing the exact same thing : making me leave edit mode. 

.Update(update => update.Action("EditingInline_Update", "PeriodesRecueil"))

 

I hoped this line to call my "EditingInline_Update" method in my "PeriodesRecueil" controller, but it doesn't. 

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult EditingInline_Update([DataSourceRequest] DataSourceRequest request, PeriodeRecueilViewModel prVm)
        {
            return Json(new { });
        }

 

Here is my html

@model List<PeriodeRecueilViewModel>

 

@(Html.Kendo().Grid(Model)
    .Name("gridHistoPeriodesRecueil")
    .NoRecords("Aucune période de récueil n'a été trouvée.")
    .Columns(columns =>
    {
        columns.Bound(l => l.dateDebut)
            .Title("Date de début")
            .Width(300)
            .ClientTemplate("<div class=#:hasErrorDateDebut?'orangeBack':''#>" +
                                "<div class=#:isActive?'greenBack':''#>" +
                                    " #=kendo.toString(dateDebut,'dd / MM / yyyy')# " +
                                "</div>" +
                            "</div>")
            .HeaderHtmlAttributes(new { style = "text-align:center;" })
            .Filterable(filterable => filterable
                .Extra(false)
                .Messages(m => m.Info("Afficher les lignes dont la date..."))
                .Operators(operators => operators
                    .ForDate(dt => dt.Clear()
                        .IsEqualTo("est...")
                        .IsGreaterThanOrEqualTo("est ultérieure à...")
                        .IsLessThanOrEqualTo("est antérieure à...")))
            )
            .EditorTemplateName("Date");
 
        columns.Bound(l => l.dateFin)
            .Title("Date de fin")
            .Width(300)
            .ClientTemplate("<div class=#:hasErrorDateFin?'orangeBack':''#> " +
                                "#=kendo.toString(dateFin,'dd / MM / yyyy')# " +
                            "</div>")
            .HeaderHtmlAttributes(new { style = "text-align:center;" })
            .Filterable(filterable => filterable
                .Extra(false)
                .Messages(m => m.Info("Afficher les lignes dont la date..."))
                .Operators(operators => operators
                    .ForDate(dt => dt.Clear()
                        .IsEqualTo("est...")
                        .IsGreaterThanOrEqualTo("est ultérieure à...")
                        .IsLessThanOrEqualTo("est antérieure à...")))
            )
            .EditorTemplateName("Date");
 
        columns.Template(@<text></text>)
            .Title("États")
            .Width(125)
            .ClientTemplate("# if(hasErrorDateDebut || hasErrorDateFin) {# <div class='k-icon k-i-warning'></div> #} # " +
                            "# if(isActive) {# <div class='k-icon k-i-doughnut'></div> #} # " +
                            "# if(hasHappened) {# <div class='k-icon k-i-clock'></div> #} #")
            .HeaderHtmlAttributes(new { style = "text-align:center;" });
 
            columns.Command(command =>
            {
                command.Edit().Text(" ").IconClass("k-icon k-i-edit").Visible("hasNotHappened").UpdateText(" ").CancelText(" ");
                command.Custom("cmdAnnuler").Text(" ").Click("cmdAnnuler").IconClass("k-icon k-i-close").Visible("hasNotHappenedAndNotToday");
            })
                    .Title("Actions")
                    .Width(125)
                    .HeaderHtmlAttributes(new { style = "text-align:center" })
                    .HtmlAttributes(new { @class = "actions" });
    })
    .Events(events => events
            .DataBound("onDataBound"))
    .Editable(editable => editable.Mode(GridEditMode.InLine))
    .HtmlAttributes(new { style = "text-align:center" })
    .DataSource(dataSource => dataSource
        .Ajax()
        .Model(model => model.Id(l => l.idPeriodePaie))
        .Update(update => update.Action("EditingInline_Update", "PeriodesRecueil"))
        .ServerOperation(false)
        .PageSize(10))
    .Pageable()
    .Filterable()
)

 

No error in the console. Any idea of what I'm doing wrong ?

 

Thank you,

Valentin

Tsvetomir
Telerik team
 answered on 07 Jan 2021
21 answers
2.8K+ views
How can I select the textbox's contents when it receives the focus.  Ordinarily, I would call select() within jQuery's focus event handler.  However, this does not work with the numeric textbox.  I presume this is because the input that ultimately receives focus has style display:none when the page is loaded.
Tsvetomir
Telerik team
 answered on 07 Jan 2021
1 answer
141 views

Hello, 

 

I had button list above grid something like this :

<ul style="list-style: none; -webkit-padding-start: 0px;">
    <li style="display: inline-block;">
        <a class="btn btn-default k-button" id="Started" onclick="Started();">Started</a>
    </li>
    <li style="display: inline-block;">
        <a class="btn btn-default k-button standardButton" id="Finished" onclick="Finish();">Finish</a>
    </li>
    <li style="display: inline-block;">
        <a class="btn btn-default k-button standardButton" id="Progress" onclick="Progress();">Progress</a>
    </li>
</ul>

 

I want to add these button in context - menu grid. While I add  abovle list inside ul id = "context-menu" , and the script below. context-menu is display in the grid but the button list disappear. I want to show both button lists above grid  and also in context-menu. How can I prevent to disappearing button list? thanks in advance.

<ul id="context-menu" style="list-style: none; -webkit-padding-start: 0px;">
    <li style="display: inline-block;">
        <a class="btn btn-default k-button" id="Started" onclick="Started();">Started</a>
    </li>
    <li style="display: inline-block;">
        <a class="btn btn-default k-button standardButton" id="Finished" onclick="Finish();">Finish</a>
    </li>
    <li style="display: inline-block;">
        <a class="btn btn-default k-button standardButton" id="Progress" onclick="Progress();">Progress</a>
    </li>
</ul>
 
<script>
    $(document).ready(function() {
        $("#context-menu").kendoContextMenu();
    });
</script>

 

Neli
Telerik team
 answered on 07 Jan 2021
2 answers
206 views

When View Details is enabled and details are shown for docx files, the TYpe is showing as 'Text'.

This happens in the online demo:https://demos.telerik.com/kendo-ui/filemanager/index

Go to the documents folder and select WordDocument with View Details enabled to see example

Is this a bug or as intended?

Alan
Top achievements
Rank 1
Veteran
 answered on 06 Jan 2021
3 answers
2.0K+ views

Hi,

I have requirement to set different business hours for different day.

For example on Monday from 8:00 AM to 4:00 PM and on Tuesday from 11:00 AM to 7:00 PM and so on.

Need help on this how I can achieve this in Kendo Scheduler.

Thanks

Misho
Telerik team
 answered on 06 Jan 2021
3 answers
209 views
I have a Date field in the Grid and the incoming value is a string.  The field can be displayed properly when the incoming string has the format of ISO datetime (2020-05-15T12:23:20). But it is not displayed when the incoming string has the format of local time (Oct 06, 2020 04:30 PM). Following is the schema settings for the DataSource. Can you tell me how to make the Grid accept the local time format.

                schema:{
                    total: function(){ return scope.totalDocumentCount },
                    model: {
                        id: "DocumentId",
                        fields: {
                            Date: { type: 'date'}
                        }
                    }
                },
Tsvetomir
Telerik team
 answered on 06 Jan 2021
1 answer
297 views

Hi,

We have added scheduler in partial view with kendo ui js. (All scheduler js are in partial view as we need to use this common view in many pages.)

On main page, we have used jquery load method (for loading the partial view) on click on button.

It loads the control perfectly fine.  It also displays the event.

But when we try to add\edit\delete operation, we are getting error.

VM2284:113 Uncaught TypeError: c.ui.validator.validateOnInit is not a function
    at init._validateOnInit (<anonymous>:113:9440)
    at new init (<anonymous>:113:7213)
    at init.refresh (<anonymous>:265:11880)
    at new init (<anonymous>:265:9159)
    at HTMLDivElement.<anonymous> (<anonymous>:30:5608)
    at Function.each (masterpagejs?v=UucszGsF6c2MewgvGCU79DYX2aiYoO5WtG8R6tBh_k81:1)
    at R.fn.init.each (masterpagejs?v=UucszGsF6c2MewgvGCU79DYX2aiYoO5WtG8R6tBh_k81:1)
    at R.fn.init.e.fn.<computed> [as kendoEditable] (<anonymous>:30:5582)
    at r.editEvent (<anonymous>:556:21652)
    at init._createPopupEditor (<anonymous>:563:18759)

 

 

Neli
Telerik team
 answered on 05 Jan 2021
2 answers
293 views

I am having an issue with the display of folders in the FileManager on initial load. If I use a local data source, everything works fine.(see Capture_local.png)

Here is an example of my local datasource:

var data = [
        {        
"name": "Training1",
"size": 0,
"path": "Training1",
"extension": "",
"isDirectory": true,
"hasDirectories": false,
"created": "2020-12-28T18:49:36.644558Z",
"modified": "2020-12-28T18:49:36.644584Z",
"createdUtc": "2020-12-28T18:49:36.644606Z",
"modifiedUtc": "2020-12-28T18:49:36.644628Z"
},
{
"name": "Training2",
"size": 0,
"path": "Training2",
"extension": "",
"isDirectory": true,
"hasDirectories": false,
"created": "2020-12-28T18:49:36.644558Z",
"modified": "2020-12-28T18:49:36.644584Z",
"createdUtc": "2020-12-28T18:49:36.644606Z",
"modifiedUtc": "2020-12-28T18:49:36.644628Z"
},
{
"name": "Training3",
"size": 0,
"path": "Training3",
"extension": "",
"isDirectory": true,
"hasDirectories": false,
"created": "2020-12-28T18:49:36.644558Z",
"modified": "2020-12-28T18:49:36.644584Z",
"createdUtc": "2020-12-28T18:49:36.644606Z",
"modifiedUtc": "2020-12-28T18:49:36.644628Z"
}
      ];

If I set the FileManager to use a remote datasource, I am getting NaN showing in the name column. (see Capture_remote.png)

The remote datasource returns the same as above.

 

Here is my FileManager config:

var filemanager = $("#fileManager").kendoFileManager({
     dataSource: filemanagerDataSource,
     height:600,
     initialView: 'grid',
     contextMenu: false,
     toolbar: {
       items: [
        { name: "sortDirection" }filemanagerDataSource,
        { name: "changeView" },
        { name: "spacer" },
        { name: "details" },
        { name: "search" }
        ]
     },
     views: {
       grid: {
         noRecords: true,
       }
     }
}).data('kendoFileManager');

 

I can set the FileManager demo (using kendo dojo) to use the grid view on initial load and it seems to work fine, so I'm not sure what may be causing the issue. Any help would be appreciated. Please let me know if more info is needed.

Thank you.

Alan
Top achievements
Rank 1
Veteran
 answered on 04 Jan 2021
2 answers
535 views

The navigate method lets us select a folder by name. Is there a way to always select the first folder listed; by some sort of index maybe? 

 

Alan
Top achievements
Rank 1
Veteran
 answered on 04 Jan 2021
5 answers
1.2K+ views
How can I hide the last column of my grid having action elements while doing a pdf export.I want to override the css for pdf export so as when the grid is exported the last column is hidden in the pdf. I also have a requirement wherein I want to show the last column in the exported pdf as that grid contains data instead of action elements.Thanks
Alex Hajigeorgieva
Telerik team
 answered on 31 Dec 2020
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?