Telerik Forums
Kendo UI for jQuery Forum
3 answers
1.3K+ views

i have a grid where the current input cell that is being edited may have had a class added to it in a prior edit to indicate that it  had been changed

 

or the current input cell being edited may be in process of being edited and has the k-dirty flag

 

Can I interrogate that cell in javascript or jquery  to determine the class or classes that are attached to that input cell?

 

I am not able to find any examples 

 

thanks

Jim

 

 

 

 

Viktor Tachev
Telerik team
 answered on 06 Dec 2018
3 answers
411 views

I am using Time Picker in MVVM SPA application page. it is happening in IE 11 (working fine in FireFox ).

when i select a time from Dropdown picker or even manually enter it in Time picker Text Box. it gets the value property set to the  that value.

however it resets  to 12:00 AM and sometimes to 10:00 PM and shows that value in Time picker's text box. However value field returns me correct value.

 

following is the declaration of Time picker

$("#tpRunTime").kendoTimePicker({
                dateInput: true
            });

 

<tr>
                    <td class="col-md-8"><input id="tpRunTime" name="Run time" data-required-msg="Select run time" required /></td>
                </tr>

 

 

Please advise.

 

 

 

 

 

Konstantin Dikov
Telerik team
 answered on 06 Dec 2018
2 answers
3.1K+ views

I have a Kendo grid set up, including a template string that shows a button to click to see more details about the row. In order to do this, I set a 'dataBound' function to fire that attaches a click event to each row... which fires the below function. The idea is that this function will accept the 'event' details and use them to show the respective deatils in a pop up box. However, when I get to the bolded line below, I get an error that .dataItem is not a function at showDetails.

I know that this used to work when there was no template string being used (I implemented the template string for some conditional row formatting). Is there a way to pass these 'event' details to the function in this manner?

function showDetails(e) {
         e.preventDefault();
         var dataItem = this.dataItem($(e.currentTarget).closest("tr"));
         wnd.content(detailsTemplate(dataItem));
         wnd.center().open();
}

Viktor Tachev
Telerik team
 answered on 06 Dec 2018
6 answers
281 views

Lately, I see lots of errors like this:

" failed:  TypeError: Cannot read property '__kendo_devtools_id' of undefined"

 

And the performance is a bit sluggish in Chrome

Any new Issue with chrome?

Dimitar
Telerik team
 answered on 06 Dec 2018
2 answers
529 views

I'm using bootstrap with a material theme for bootstrap in my project.  I want my kendo controls to look material as well.  Currently for bootstrap v4 I must use the kendo bootstrap v4 file to keep my regular bootstrap formatting working, this means my kendo controls look nothing like I want them to look. Bootstrap should not be a "theme".  Are there any new "fixes" that can be applied to make this scenario work?  Is there a way to modify the current material theme in a way that doesn't break bootstrap?  The theme builder doesn't give anywhere near enough customization to achieve a material look.

 

It would be good if in the future you could separate theming from the layout system so your bootstrap file is additive to any theme the user wants to use. Right now we are frantically evaluating all options and that includes eliminating Kendo UI completely unfortunately.  I am hoping there is a solution because kendo is already in, but more work has been invested in the overall app design.

 

Thank you in advance

Mike
Top achievements
Rank 1
 answered on 05 Dec 2018
2 answers
787 views

Hello,

I'm using the grid with AngularJS on a screen where I need to make the data change "in line."
The 'update' method needs to check whether that operation can be done or not (depending on business rules).
But when I make the call to the API method I get an error.
Follow my code.

$scope.gridOptions = {
                    columns: [
                        {
                            command: [
                                { name: "edit", text: " "},
                                { name: "destroy", text: " " }
                            ], title: " ", width: 230
                        },
 
                        { field: "StateID", title: "ID", width: 70 },
                        { field: "StateCode", title: "Code", width: 70 },
                        { field: "StateName", title: "Name" }
                    ],
                    dataSource: {
                        pageSize: 5,
                        batch: false,
                        transport: {
                            read: {
                                url: "/Definitions/Country/State_Get_List/" + ID,
                                dataType: "json",
                                type: "GET",
                                contentType: "application/json; charset=utf-8"
                            },
                            update: function (opt) {
                                $http.post(urlTest, '"' + opt.data.model + '"')
                                    .success(function (res) {
                                        if (res === '0') {
                                            alert('you can not update this');
                                        }
                                        else {
                                            alert('Success!');
                                        }
                                    });
 
                            },
                            create: function (opt) {
                                alert('create');
                                opt.sucess();
                            },
                            destroy: function (opt) {
                                alert('destroy');
                                opt.sucess();
                            }
                        },
                        schema: {
                            model: {
                                id: "StateID",
                                fields: {
                                    StateID: { editable: false, type: "number", nullable: true },
                                    StateCode: { type: "string" },
                                    StateName: { type: "string" }
                                }
                            }
                        }
                    },
                    filterable: false,
                    sortable: true,
                    autoBind: true,
                    navigatable: true,
                    pageable: true,
                    height: 390,
                    editable: "inline",
                    toolbar: ["create"]
                };

 

My API method (ASP.NET MVC):

[HttpPost]
public JsonResult State_Save([System.Web.Http.FromBody]State state)
{
    string _return = "0";
 
    // I WILL CHECK IF THIS UPDATE WILL BE OK,
    // IF NOT I WILL CHANGE TO "1"
 
    return Json(_return, JsonRequestBehavior.AllowGet);
}

The list of states appears, but when I try to edit and click the "Update" button the below error appears.

jQuery.Deferred exception: Unexpected number SyntaxError: Unexpected number

 

 

 

Konstantin Dikov
Telerik team
 answered on 05 Dec 2018
1 answer
103 views

  if X_axis Min value is "0" then Tooltip showing "d" on header,  please refer attached screenshot and give any suggestion i can i able to show "0" instead of "d" on tooltip header.

   Thanks,

.NET Developer

Tsvetina
Telerik team
 answered on 05 Dec 2018
1 answer
90 views

Hi,

I have a resizable angular kendo grid, whenever I do column resize grid data cleared off and shows empty grid.

Having this problem in all the browsers. We haven't met this problem ever before.

Thanks in advance.

 

Viktor Tachev
Telerik team
 answered on 05 Dec 2018
4 answers
2.2K+ views

HI All,

A custom request got me spinning and wondering if any of you came across it and have a solution for me.

A NumericTextBox in the a grid column.

1. Show the exact value keyed in by the user.

    Eg. 12.12345, 23.55, 76.590

2. Value could have decimal precision up to 5 places

3. If the user enter 1.1, it should display 1.10. (showing 1 trailing 0 in the case)

I have solution to 1 and 2, but not 3.

I tried using template: "#=kendo.toString(OrderQuantity,'n2')#" for the column, It will show 2 decimal places like I wanted, but it's rounded and not what the user entered.

TIA

 

Steve
Top achievements
Rank 1
 answered on 04 Dec 2018
9 answers
169 views

I am using Asp.net core on the , in my controller I have the following code

       [HttpPost]

          public IActionResult GetUsers(string search)
        {
            var result = new List<UserDto>
            {
                new UserDto
                {
                    UserId = 1,
                    FirstName = "jhon",
                    LastName = "doe",
                    UserName = "jhond",
                    Email = "jhond@AOL.com"
                },
                new UserDto
                {
                    UserId = 2,
                    FirstName = "james",
                    LastName = "bond",
                    UserName = "jamesd",
                    Email = "jamesd@gmail.com"
                }
            };

            var data = new DataSourceResult
            {
                Total = 2,
                Data = result
            };

            return Json(data);
        }

Now my DataSourceResult object looks like this

 public class DataSourceResult<T>
    {
        /// <summary>
        /// Extra data
        /// </summary>
        public object ExtraData { get; set; }

        /// <summary>
        /// Data
        /// </summary>
        public T Data { get; set; }

        public bool Success => !Errors.Any();
        /// <summary>
        /// Errors
        /// </summary>
        public List<string> Errors { get; set; } = new List<string>();
        public Exception Exception { get; set; } 
        /// <summary>
        /// Total records
        /// </summary>
        public int Total { get; set; }
    }

    public class DataSourceResult : DataSourceResult<object>
    {

    }

My   view has this code inside

  <div id="gridUserInfo"></div>

$(document).ready(() => {

 $("#gridUserInfo").kendoGrid({
            dataSource: {
                transport: {
                    read: {
                        url: "/User/GetUsers",
                        type: "POST",
                        dataType: "json",
                        data: function() {
                            var data = {
                                search: $('#search').val()
                            };
                            return data;
                        }
                    }
                },
                schema: {
                    data: "Data",
                    total: "Total",
                    errors: "Errors",
                    model: {
                        id: "userId",
                        fields: {
                            firstName: { editable: false, type: "string" },
                            lastName: { editable: false, type: "string" },
                            userName: { editable: false, type: "string" },
                            email: { editable: false, type: "string" }
                        }
                    }
                }
            },
            height: 550,
            columns: [
                {
                    field: "firstName",
                    title: "First Name"
                },
                {
                    field: "lastName",
                    title: "Last Name"
                },
                {
                    field: "userName",
                    title: "UserName"
                },
                {
                    field: "email",
                    title: "Email"
                }
            ],
            pageable: {
                pageSizes: [10, 20, 30],
                buttonCount: 5
            }
        });

}

 

After making a POST to my UserControllerI get the following json

{"extraData":null,"data":[{"userId":1,"firstName":"jhon","lastName":"doe","email":"jhond@AOL.com","userName":"jhond"},{"userId":2,"firstName":"james","lastName":"bond","email":"jamesd@gmail.com","userName":"jamesd"}],"success":true,"errors":[],"exception":null,"total":2}

 

But it is not displaying that information on the grid, What am I doing wrong?

 

 

Eyup
Telerik team
 answered on 04 Dec 2018
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?