Telerik Forums
Kendo UI for jQuery Forum
1 answer
74 views

Hello,

I am currently receiving the dates on my grid as strings and looking for a way to filter them as though they were dates. I tried simply changing the type in the schema from type: 'string' to type: 'date' and as far as the filtering goes this accomplished the goal, my problem now is that I can't seem to change the format of the dates being shown, I am only getting a full JavaScript date object showing as 'Tue Oct 13 2020 00:00:00 GMT-0700 (Pacific Daylight Time).'

Other than the format everything seems to be saving and updating as expected. I have tried simply adding format: "{0:dd-MMM-yyyy}" to the column as well as kendo.parseDate in the template. Any other possible solution I am missing?

Thank you in advance

Petar
Telerik team
 answered on 15 Oct 2020
7 answers
1.2K+ views

    Hi all,

I'm trying to use the persist state feature of the Kendo Grid.

I work with ASP.Net Core (2.1) and JQuery (3.3.1).

I have an issue with the grid.GetOptions(), .SetOptions() and . They always try to post to the page where I'm at. My grid is not configured to go and fetch for the data with the Datasource option of the grid. My data for the grid are passed along the model.

 
Tsvetomir
Telerik team
 answered on 14 Oct 2020
1 answer
139 views

 

Trying to initialize ArcGauge using data attributes.

Nothing seems to happen when I set

data-center-template

or data-colors

See:

https://jsfiddle.net/bglase/cp5g4jen/2/

I expected the gauge color to change based on the selected value, and the numeric value to be shown in the center of the gauge.

 

thanks in advance for any advice

Eyup
Telerik team
 answered on 14 Oct 2020
2 answers
220 views

How can I populate this combobox with items from the controller onPage Load? The following is not working

 

<input id="CodeList" placeholder="Select" style="width: 100%;" />

<script>
    $(document).ready(function () {
        $("#CodeList").kendoComboBox({
            index: 0,
            dataTextField: "text",
            dataValueField: "value",
            filter: "contains",
            dataSource: {

                 transport: {

                        read: {

                            dataType: "json",

                            url: '@Url.Action("CompanyIDChanged", "Login")',

                         }

               }

            }
        });
    });
</script>

 

Controller:

Function LoanCodeCombo() As ActionResult
            Dim CodeList= New LoginModel With {.Items = {
                New SelectListItem() With {.Text = ""},
                New SelectListItem() With {.Text = "A"},
                New SelectListItem() With {.Text = "B"},
                New SelectListItem() With {.Text = "C"},
                New SelectListItem() With {.Text = "S"},
                New SelectListItem() With {.Text = "T"},
                New SelectListItem() With {.Text = "U"},
                New SelectListItem() With {.Text = "7"},
                New SelectListItem() With {.Text = "8"},
                New SelectListItem() With {.Text = "9"},
                New SelectListItem() With {.Text = "0"}
                }
            }
            Return Json(CodeList, JsonRequestBehavior.AllowGet)
        End Function

Joshua
Top achievements
Rank 1
Veteran
 answered on 14 Oct 2020
2 answers
97 views

I posted a similar question before but I'll try to be as clear as possible this time. I created a template for my "DealerAddressStreet" field.

{
    field: "DealerAddressStreet",
    title: "Address",
    sortable: false,
    width: "140px",
    editor: googleAutoComplete
},

 

This is my template which creates a text input that calls a JS function called "initAutocomplete()". 

function googleAutoComplete(container, options) {
    var input = $('<input id="Dynamic_DealerAddressStreet" type="text" class="k-textbox" name="DealerAddressStreet" data-bind="value:DealerAddressStreet" onfocus="initAutocomplete()">');
    input.appendTo(container);
}

 

The JS function gets the user's location and provides autocomplete for the address typed in. It also inserts the values into the address text inputs without the user having to type them in manually.

function initAutocomplete() {
    console.log('Function executed...');
    autocomplete = new google.maps.places.Autocomplete(
        document.getElementById("Dynamic_DealerAddressStreet"),
        { types: ["geocode"] }
    );
    autocomplete.setFields(["address_component"]);
    autocomplete.addListener("place_changed", fillInAddress);
}
 
function fillInAddress() {
    const place = autocomplete.getPlace();
 
    var tbAddress = $('#DealerAddressStreet');
    var tbCity = $('#DealerAddressCity');
    var tbState = $('#DealerAddressState');
    var tbZip = $('#DealerAddressZip');
 
    var address = place.address_components[0].short_name + ' ' + place.address_components[1].short_name;
    var city = place.address_components[2].short_name;
    var state = place.address_components[4].short_name;
    var zipcode = place.address_components[6].short_name;
    //var country = place.address_components[5].short_name
 
    // Set input values
    tbAddress.attr('value', address);
    tbCity.attr('value', city);
    tbState.attr('value', state);
    tbZip.attr('value', zipcode);
 
    tbAddress.val(address);
    tbCity.val(city);
    tbState.val(state);
    tbZip.val(zipcode);
}

 

The problem is that the new text input values are NOT being read when UPDATING or CREATING a new record if the values are inserted dynamically through my script. How can this issue be resolved?

Eric
Top achievements
Rank 1
 answered on 13 Oct 2020
2 answers
124 views
I'm trying to assign a value to 4 separate text inputs using jQuery inside of my Kendo Grid. My JS function works and the text inputs do populate with data but when I try creating a new record the data appears to not be bound when passed back to my Web API. 
Tsvetomir
Telerik team
 answered on 13 Oct 2020
11 answers
451 views
Hi,
I have a few issues right now which i cant seem to address. if anyone has any info or suggestions would be appreciated, thanks,

i am using batch editing, and so,...

1.) Is there a way to disable sorting while editing?

and

2.) Is there a way to load the grid in edit mode? users are having a tough time figuring out which columns are editable at first. i would like to have the behavior of when you click on an editable cell it renders differently... can i have that for all columns at once?

Thanks,

Rolando

Ivan Danchev
Telerik team
 answered on 13 Oct 2020
5 answers
290 views

Hello, 

I need a little help regarding pushUpdate function on my gantt widget. When my gantt has significant number of items in dataSource (cca 700) pushUpdate takes approx. 15 seconds to update. 

I can't use option to transform dataSource.data to array, insert/replace records, and then set it back, because I have multiple users working on same project, and I receive update notifications via webSocket, so frequency and number of updates can vary. Basically I don't have the time pocket where I can be sure that someone changes won't be overwritten, and specially because my gantt is being changed "from behind" because someone else changed project I am working on.

I am currently on Kendo UI version 2019. R3 (and have no chance to update it in next 2-3 months).

 

Thanks

Veselin Tsvetanov
Telerik team
 answered on 13 Oct 2020
3 answers
157 views
<div id="chart"></div>
<script>
$("#chart").kendoChart({
  categoryAxis: [{
    justified: true,
    categories: ["2012", "2013"]
  }],
  series: [
    { type: "line", data: [1, 2, 3] },
    { type: "bar", data: [1, 2, 3] }
  ]
});
</script>

 

What I'm trying to do here is I want to justify both line and bar chart so that there is no space in the beginning and also at the end. But I cannot use justify since categoryAxis.justified is only works with line chart. Is there any other option I can use to that both line and bar chart can justify.

Tsvetomir
Telerik team
 answered on 12 Oct 2020
3 answers
167 views

Hi, is there a way to remove the Update button from viewHtml? We want the user to be able to edit as they please until they select view as html. We only want them to view html as read only for information purposes. Thanks.

https://dojo.telerik.com/USEwEgis

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>Kendo UI Snippet</title>

    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2020.3.915/styles/kendo.default-v2.min.css"/>

    <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2020.3.915/js/kendo.all.min.js"></script>
</head>
<body>
  
<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  tools: [
    "bold", "italic", "underline",
                    {
                        name: "viewHtml",
                        tooltip: "View Html",
                    }
  ]
});
</script>
</body>
</html>

Martin
Telerik team
 answered on 12 Oct 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?