Telerik Forums
Kendo UI for jQuery Forum
0 answers
105 views
When I hide other columns and only column Id is show, when I try show other columns again the width of grid is the same of colums Id. How to make others column working normaly?
Felipe
Top achievements
Rank 1
 asked on 04 Jul 2023
2 answers
415 views
I have a dropdown list with virtualization (https://dojo.telerik.com/AhuQEDEL/2). When I open and close the dropdownlist without actually changing anything the change event is occasionally triggered. I reproduced the odd behavior in this this Dojo. You will notice that the "change" is logged in the console when you open and close the list without selecting anything. This behavior is also inconsistent as sometimes it logs the change and sometimes it doesn't. 
Neli
Telerik team
 answered on 04 Jul 2023
2 answers
459 views

Hi, I try to turn your "Date Range Picker" widget into a "Year Range Picker".

Your widget give the options "start" and "depth". I believed that will be work well but absolutely not... When I use the both options, the widget stop to work.

I tried with your example in kendo ui dojo, this code :

    
<div id="example" style="text-align: center;">
    <div class="demo-section k-content wide" style="display: inline-block;">

        <h4>Pick a date range</h4>
        <div id="daterangepicker" title="daterangepicker"></div>
    </div>
    <script>
        $(document).ready(function() {
            $("#daterangepicker").kendoDateRangePicker({
    		start: "decade",
    		depth: "decade"
            });
        });
    </script>
</div>
Why it doesn't work and how to fix it ?
n/a
Top achievements
Rank 1
Iron
 answered on 03 Jul 2023
0 answers
102 views

I have kendo grid that consumes data from a service.I checked from the server side no doubles.

when i show all the records in the kendo grid no doubles.

The problem is when i paginate from page 1 to page 2 there is a record that i find in both pages.

youssef
Top achievements
Rank 1
 asked on 30 Jun 2023
1 answer
980 views

Hello kendo,

When an user is entering the date with an invalid format like dd.mm.yyyy (so 27.06.2023) into our datepicker, it looks like the date is accepted in the UI, but the value is actually empty. What is confusing for the user. To fix this we would like to clear the value when an user entered an invalid date. How can we do this ?

I found an example for the datetimepicker, but it requires an initial filled in date, if you start with an empty value it's not working. The problem comes from the problem that it's impossible to tell if the value is empy or invalid.

https://docs.telerik.com/kendo-ui/knowledge-base/prevent-invalid-values
PS the script has an bug and is not working, add to following to the script to get it working:   

        $("#datetimepicker").kendoDateTimePicker({
          change: onChange,
          close: onClose,
          open: onOpen,
          value: new Date()
        });
        var lastValidDate = $("#datetimepicker").data('kendoDateTimePicker').value();
      });
    </script> 

Regards,
Jeroen

Nikolay
Telerik team
 answered on 30 Jun 2023
1 answer
157 views

https://dojo.telerik.com/EgiqeKug

I have a kendo dropdownlist with virtualization. I am including an optionLabel and a valueMapper. Unfortunately, including the valueMapper causes the option label to not show up. Is there a fix for this? Here is a dojo showing the issue

Lee
Top achievements
Rank 2
Bronze
Bronze
Bronze
 updated answer on 29 Jun 2023
1 answer
104 views

I am showing pagination at bottom of Kendo Grid and data is coming dynamically, but when data is not there and the total parameter is 0 i am observing nothing in the pages. For this see the below screenshot

 

 

How we can resolve this issue?

 

Martin
Telerik team
 answered on 29 Jun 2023
1 answer
490 views
I am trying to attach pdf file to email and send email notifications to users. Problem is when try to use kendo.saveAs its opening in another window .  If user browser is having pop up block, the email function is not working as it is not allowing open other window. Is there any way that i can do this in same window or any other option?
$.ajax({
                        type: "POST",
                        data: data,
                        url: "IUA/Submit",
                        success: function (result) {
                            if (result.Id !== 0) {
                                alert("Your application has completed the review phase and is confirmed complete. Your PIN will be " + result.Id + ". To complete your submission, please click the OK button below.");
                                $('#loading').hide();

                                kendo.drawing.drawDOM($("#mainDiv"))
                                    .then(function (group) {
                                        // Render the result as a PDF file
                                        return kendo.drawing.exportPDF(group, {
                                            paperSize: "auto",
                                            margin: { left: "1cm", top: "1cm", right: "1cm", bottom: "1cm" }
                                        });
                                    })
                                    .done(function (data) {
                                        // Save the PDF file
                                        kendo.saveAs({
                                            type: 'POST',
                                            dataURI: data,
                                            fileName: "IUAEnrollment.pdf",
                                            proxyURL: '@Url.Action("SavePDF", "IUA")',
                                            forceProxy: true,
                                            proxyTarget: "_blank"
                                        });
                                        displayLoading("#formDiv", false);
                                        location.reload();
                                    });
                            } else if (result.IsDuplicateRec == true) {
                                $('#loading').hide();
                                $("#divDuplicate").show();
                                $("#captchaDiv").load(location.href + " #captchaDiv>*", "");
                            } else if (result.IsMVCCaptcha == false) {
                                $('label[for="lblCaptchaErr"]').show();
                                $("#captchaDiv").load(location.href + " #captchaDiv>*", "");
                                setTimeout(WaitUntilLoad, 6000);
                            }
                        },
                        error: function () {
                            $('#loading').hide();
                            alert("Error occured during the submission. Please contact helpdesk.");
                        }
                    });
Martin
Telerik team
 answered on 28 Jun 2023
1 answer
417 views

Hi. I'm using this plugin for jQuery to download a PDF via AJAX. Here's the code that fetches the PDF from ASP.NET Web API:

fetchFile: function (id) {
	return new Promise(function (resolve, reject) {
		$.ajax({
			async: true,
			dataType: "native",			// Uses the jquery-ajax-native plugin for blobs.
			type: "POST",
			url: `https://someapp.org/api/files/file/fetch/${id}`,
			xhrFields: {				// Uses the jquery-ajax-native plugin for blobs.
				responseType: "blob"
			},
			cache: false
		}).done(function (data) {
			return resolve(data);
		}).fail(function (xhr, status, error) {
			const errorObj = new Error(xhr.responseText || error);
			return reject(errorObj);
		});
	});
}

I would like to feed the BLOB data returned by the fetchPdf function to set the PDFViewer's data. Is this possible? Maybe PDFViewer can fetch via AJAX directly. Any examples?

Thank you.

Neli
Telerik team
 answered on 28 Jun 2023
0 answers
236 views

I have this field in my kendo grid column :

field: "tauxAcquisEntree",
template: '#if (tauxAcquisEntree === 0){#'
                    + '<div class="text-right">#= tauxAcquisEntree #</div>'
                    + '# }else if (tauxAcquisEntree > 1 ){#'
                    + '<div class="d-flex justify-content-end"><div class="input-group d-flex flex-nowrap percent-input"> <input id="fraisent" name="fraisent" value="#= tauxAcquisEntree #" max="4"   class="form-control text-center"  min="1" type="number" step=1 pattern="[0-9]$" autocomplete="off"   /> </div></div>'
                    + '# }else{#'
                    + '<div id="fraisOne" name="fraisOne" class="d-flex justify-content-end"><div class="input-group d-flex flex-nowrap percent-input"> <input value="#= tauxAcquisEntree #" class="form-control text-center" max="1" min="1"  type ="number" pattern="[0-1]$" autocomplete="off" readonly  /> </div></div>'
                    + '# }#'
                ,

I have a condition when i get the field "tauxAcquisEntree" from the "database"  if it's equal to "1" the input type number becomes readonly.

The problem is when the user changes the value of the input type number in the front and it's equal to "1" the template condition gets triggered which is a behavior that i don't want to happen.

To summarize how can i get the if condition in the template to be applied only if the value if from backend or the database (and not what the user typed) ?

youssef
Top achievements
Rank 1
 updated question on 28 Jun 2023
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
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
BulletChart
Licensing
QRCode
ResponsivePanel
TextArea
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
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?